JPEG color profile definition

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

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

  • Information about color profiles is contained in the XMP block. The XMP block is located in the 0xFFE1 JPEG section (same as EXIF). In the marked section of this section follows the line http://ns.adobe.com/xap/1.0/ . However, when I divided this section, Photoshop was still able to detect the color profile.

  • The EXIF tag has a color space tag (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 non-calibration. So this is not this tag.

  • I experimented with a single image, storing it in two different color profiles, and besides the changes in XMP and EXIF, I noticed that there is probably a whole new section of JPEG. It starts with 0xFFE2 , and the ICC_PROFILE line follows the marker . This is perhaps the most likely case.

Does anyone have experience managing JPEG color profiles? I would say that the information in EXIF ​​and XMP is just metadata, and the important thing is that there is an ICC_PROFILE section.

+4
source share
2 answers

ICC profiles are stored in JPEG application files. These blocks are designed to ensure that applications store any data they need, so they do not comply with the JPEG specification. In other words, the JPEG file format does not determine how to embed color profiles, you just see the actual ways to execute it.

Since application segments can be used by anyone for anything, you need to identify and verify the content before you can say for sure that it contains an ICC profile.

Thus, three ways to share ICC profiles can be provided:

  • By embedding the ICC profile in the application segment 02, added with ICC_PROFILE\0x00\0x01\0x01 to identify it. Currently, I'm not sure if two \0x01 mean anything, or if they are always like that. After these 14 characters, the actual ICC profile is saved.
  • Embedding the ICC profile in the embedded EXIF ​​metadata file in the application segment 01.
  • Embedding the ICC profile in the embedded XAM metadata file in the application segment 01. This is added using http://ns.adobe.com/xap/1.0/\0x00 .

I also could not find any specific information. It would be nice if the ICC said, “this is how to do it,” but I have not yet been able to find one. Thus, as far as I know, any of them can potentially be used as an ICC profile, and this will depend on the application about whether it will download the profile or not. The application segment 02 seems to be the usual way to execute it, although what you want to test may depend on your use case. As another comment showed, some HELIOS EtherShare programs have their own way of doing this. (I have not yet confirmed the presence of the ICC profile in the metadata, however I really did not look so strong, and it would not surprise me if you could find files with several conflicting ICC profiles in the wild.)

+2
source

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

Which is from the Google cache.

+1
source

All Articles