Skip to content

Commit 7e7dbbb

Browse files
committed
Switch order of component id check
1 parent 1c183f1 commit 7e7dbbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ private JpegColorSpace DeduceJpegColorSpace(byte componentCount, JpegComponent[]
363363
}
364364

365365
// If the component Id's are R, G, B in ASCII the colorspace is RGB and not YCbCr.
366-
if (components[0].Id == 82 && components[1].Id == 71 && components[2].Id == 66)
366+
if (components[2].Id == 66 && components[1].Id == 71 && components[0].Id == 82)
367367
{
368368
return JpegColorSpace.RGB;
369369
}

0 commit comments

Comments
 (0)