Skip to content

Commit b10d88a

Browse files
Put that thing back where it came from or so help me!
1 parent e2cde19 commit b10d88a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ private void ConvertStride(int spectralStep, IccProfile iccProfile)
144144

145145
JpegColorConverterBase.ComponentValues values = new(this.componentProcessors, y);
146146

147-
values = values.Slice(0, width); // slice away Jpeg padding
148-
149147
if (iccProfile != null)
150148
{
151149
this.colorConverter.ConvertToRgbInPlaceWithIcc(this.Configuration, in values, iccProfile);
@@ -155,6 +153,8 @@ private void ConvertStride(int spectralStep, IccProfile iccProfile)
155153
this.colorConverter.ConvertToRgbInPlace(in values);
156154
}
157155

156+
values = values.Slice(0, width); // slice away Jpeg padding
157+
158158
Span<byte> r = this.rgbBuffer.Slice(0, width);
159159
Span<byte> g = this.rgbBuffer.Slice(width, width);
160160
Span<byte> b = this.rgbBuffer.Slice(width * 2, width);

0 commit comments

Comments
 (0)