Browse Source

Put that thing back where it came from or so help me!

pull/2922/head
James Jackson-South 9 months ago
parent
commit
b10d88abc0
  1. 4
      src/ImageSharp/Formats/Jpeg/Components/Decoder/SpectralConverter{TPixel}.cs

4
src/ImageSharp/Formats/Jpeg/Components/Decoder/SpectralConverter{TPixel}.cs

@ -144,8 +144,6 @@ internal class SpectralConverter<TPixel> : SpectralConverter, IDisposable
JpegColorConverterBase.ComponentValues values = new(this.componentProcessors, y);
values = values.Slice(0, width); // slice away Jpeg padding
if (iccProfile != null)
{
this.colorConverter.ConvertToRgbInPlaceWithIcc(this.Configuration, in values, iccProfile);
@ -155,6 +153,8 @@ internal class SpectralConverter<TPixel> : SpectralConverter, IDisposable
this.colorConverter.ConvertToRgbInPlace(in values);
}
values = values.Slice(0, width); // slice away Jpeg padding
Span<byte> r = this.rgbBuffer.Slice(0, width);
Span<byte> g = this.rgbBuffer.Slice(width, width);
Span<byte> b = this.rgbBuffer.Slice(width * 2, width);

Loading…
Cancel
Save