tags:

views:

309

answers:

1

I would like to be able to detect the presence of a color profile in JPEG. To be clear: I'm not interested in actually carrying out the color corrections or doing anything else with them.

I did some investigation, but I could not find any definite source of information. Here is what I know so far:

  • There is a color profile information in the XMP block. The XMP block is in a 0xFFE1 JPEG section (the same as EXIF). The marked of this section is followed by the http://ns.adobe.com/xap/1.0/ string. However, when I stripped this section, Photoshop was still able to detect the color profile.

  • There is a color space tag in EXIF itself as well (tag = 0xA001). It has only one value defined in the EXIF specification: 1 = sRGB. I noticed that in my image it takes the value 0xFFFF which means uncalibrated. So it’s not this tag.

  • I did an experiment with one image saving it in two different color profiles, and besides the changes in XMP and EXIF, I noticed that there is probably a whole new JPEG section. It starts by 0xFFE2 and its marker is followed by the string ICC_PROFILE. This seems to be the most likely case.

Does anybody have experience with managing color profiles in JPEG? I would say that the information in EXIF and XMP are just metadata, and that the important thing is the presence of the ICC_PROFILE section.

+1  A: 

Here is an information about ICC profiles in JPEG: http://209.85.129.132/search?q=cache%3ANx%5FM6GRbZzYJ%3Awww.helios.de%2FPDFs%2FICC-tag.pdf+JPEG+format+ICC+offset&hl=ru&gl=ru

That's from Google cache.

FractalizeR