Cross-browser incompatibilities when decoding JPEG files?

Something puzzles me - why does this image look different in every browser?

Image in IE9 (and Windows Photo Viewer):
Image in IE9

Image in Firefox (and Photoshop):
Image in Firefox

Image in Chrome (and Irfanview):
Image in Chrome

What happens in their JPEG decoding processes to make the possible output so different?

(Browse it in IE, Firefox, Chrome, etc., to see what I mean.)

+7
cross-browser jpeg decoding
source share
4 answers

JPEGSnoop (the source is now available @sourceforge) reports a large overflow of brightness before we move on to converting Y'CbCr to RGB. I get these errors on some other files, but the overflow is usually small - 256 or 257 versus a maximum of 255. The brightness calculated here is 729!

Comments by JPEGSnoop about YCC overflow:

clipping YCC to DC - each MCU adds or subtracts from the DC (average) value in the previous MCU. All this should remain within the 8-bit range, but corruption in the DC coefficient can bring this value out of the range. This type of error will result in sudden large-scale color changes or brightness in your image. As this type of error is usually not recoverable, JPEGsnoop will only report the first 10 of them in the log file.

I was not familiar with the DC MC-MCU, but Pennebaker and Mitchel agree .

*** Decoding SCAN Data *** OFFSET: 0x00000160 Scan Decode Mode: Full IDCT (AC + DC) Scan Data encountered marker 0xFFD9 @ 0x00027CA9.0 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 729, 109, 171) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 682, 109, 172) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 741, 109, 173) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 629, 109, 174) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 841, 109, 175) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 319, 109, 176) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 928, 109, 177) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 0, 0) YCC=( 624, 109, 177) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 1, 0) YCC=( 785, 107, 171) Y Overflow @ Offset 0x00027CA8.2 *** NOTE: YCC Clipped. MCU=( 1, 0) YCC=( 559, 107, 171) Y Overflow @ Offset 0x00027CA8.2 Only reported first 10 instances of this message... 
+6
source share

JPEG can be encoded in RGB or CMYK. These qualities usually arise when they are CMYK. Open the file in an image editing program and save it as RGB JPEG, and also welcome CMYK printers, which will now have different results that you previously had in your browser.

+2
source share

I only guess.
If the image was created to display these differences, it is possible that this is not a normal image that was encoded, but invalid when the calculated colors are outside the range from 0 to 255, and different decoders process them differently.

+1
source share

If you change the color profile of this image from CMYK to sRGB in Photoshop, for example, it will be displayed more or less the same in all browsers.

+1
source share

All Articles