Does embedding an ICC profile in a JPEG include the full profile data?
Asked 2/8/2012
15 views
2 answers
0
When a JPEG is saved with an ICC profile such as sRGB or Adobe RGB, is the entire ICC profile actually stored inside the file, or does the file only indicate which profile color-managed software should look up elsewhere on the system?
I checked some image metadata with ExifTool and saw both color space/profile information and the ICC field:
- Color Space: sRGB
- Profile Description: sRGB IEC61966-2.1
- CMM Flags: Not Embedded, Independent
This is confusing because the ICC spec says the profile flags can indicate whether a profile is embedded and whether it can be used independently of the image data.
So:
- If an application embeds an ICC profile into a JPEG, does it normally embed the complete profile?
- Is the CMM/profile-flags field separate from the general idea of an image having an embedded ICC profile?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
14y ago
2 Answers
7
The CMM Flags field is referring to Color Management Module flags. In this case, its saying that the ICC profile the JPEG image is tagged with is not embedded. It is possible, although not required, to embed ICC profiles within images, including JPEG images (as according to the very document you linked:)
B.4 Embedding ICC profiles in JPEG files
The JPEG standard (ISO/IEC 10918-1[2]) supports application specific data segments. These segments may be used for tagging images with ICC profiles. The APP2 marker is used to introduce the ICC profile tag. Given that there are only 15 supported APP markers, there is a chance of many applications using the same marker. ICC tags are thus identified by beginning the data with a special null terminated byte sequence, “ICC_PROFILE”.
The length field of a JPEG marker is only two bytes long; the length of the length field is included in the total. Hence, the values 0 and 1 are not legal lengths. This would limit the maximum data length to 65 533. The identification sequence would lower this even further. As it is quite possible for an ICC profile to be longer than this, a mechanism is required to break the profile into chunks and place each chunk in a separate marker. A mechanism to identify each chunk in sequence order is therefore necessary.
The identifier sequence is followed by one byte indicating the sequence number of the chunk (counting starts at 1) and one byte indicating the total number of chunks. All chunks in the sequence should indicate the same total number of chunks. The 1-byte chunk count limits the size of embeddable profiles to 16 707 345 bytes.
Generally speaking, I think images are usually only tagged with ICC profiles, rather than having them embedded, when associated with sRGB, AdobeRGB, or one of the other very common color spaces. It may be necessary to embed a profile if it is a custom profile, one that you do not expect to exist on the machines the image will generally be viewed on.
Originally by user124. Source · Licensed CC BY-SA 4.0
user124
14y ago
0
Generated from our catalog & community — verify before relying on it.
Yes—when an ICC profile is embedded in a JPEG, the profile data itself can be stored in the file, typically in JPEG APP2 segments identified as “ICC_PROFILE”. Color-managed applications can then read that embedded profile and use it for color conversion/display.
But embedding is optional. An image may be tagged as sRGB without actually carrying a full embedded ICC profile. In that case, software may rely on the standard meaning of sRGB or a system/default profile rather than extracting one from the file.
The “CMM Flags” field is part of the ICC profile header, not a separate JPEG metadata concept. It contains hints for the Color Management Module, including whether that profile is marked as embedded and whether it can be used independently. So if ExifTool shows “Not Embedded, Independent,” that means the profile header says the profile is not marked as embedded, even though the image may still have color-space metadata.
So your confusion is understandable: “this image is sRGB” and “this file contains an embedded ICC profile” are related, but not identical, things.
Recommended products
UniqueBot
AI14y ago
Your Answer
Related Questions
Why does an sRGB JPEG with an embedded ICC profile look faded in my browser?
What should I choose when Photoshop warns that an embedded color profile doesn’t match my working RGB space?
In GIMP, should I convert a TIFF tagged sRGB IEC61966-2.1 to GIMP built-in sRGB before exporting JPEGs for the web?
After soft-proofing in Lightroom, which color profile should I embed in the JPEG for printing?
Can an image contain more than one ICC profile?