What is embedded color profile information?
Color-managed image editors like Gimp, Krita, and Showfoto expect to find embedded color profile information in the metadata of every image that is opened for editing, and if they don't, they ask you what to do about this unfortunate situation.
For anyone who might not know what embedded color profile information really is, what it looks like, and why some digital images don't have any, this page offers a brief explanation.
Written September 2013. Minor updates made in February 2015.
Color profile information is information that tells an ICC-profile color-managed imaging program like Gimp or digiKam/showFoto what ICC color space profile should be used to interpret the image's RGB values. "Embedded" means the color profile information is embedded in the image's metadata.
Every color-managed image editor has a setting somewhere that asks you what to do with images that don't have color profile information. This article shows you what forms this embedded information can take, gives a list of reasons why some images don't have profile information, and explains why your image editor needs this information.
What is embedded color profile information?
An image's embedded color profile information is an answer to the question "What's the right ICC color space profile for this image?" Color profile information is embedded in the image's metadata, right along with other information such as the type of camera that took the picture, keywords describing the image, and a whole host of other information about the image.
There are two very different ways ICC profile color information can be embedded in an image's metadata:
- The image metadata might contain an actual embedded ICC color space profile.
Actual ICC profiles are usually embedded by a color-managed image editing program or a specialized command line tool such as cctiff or tificc.
- The image metadata might contain DCF (Design rule for Camera File system) tags.
These DCF tags are not real ICC profiles. Instead, they specify which ICC profile ought to be assigned to the image upon opening it with an image editing program. There are several DCF-related tags:
- "Color Space" tag
- "InteropIndex" tag
- "White Point" tag
- "Primary Chromaticities" tag
- "Gamma" tag
DCF tags are embedded by digital cameras while saving an image to the camera storage card. Which tags a camera-generated image actually contains depends on the camera, the camera settings, and the in-camera determined image color space. Most (almost all? all?) digital cameras offer only two color spaces for saving in-camera-generated jpegs, either sRGB or AdobeRGB. A camera-generated jpeg that's in the sRGB color space most likely will only have the "Color Space" and "InteropIndex" DCF tags. A camera-generated jpeg that's in the AdobeRGB color space most likely will have all five DCF tags.
What does embedded color profile information look like?
My favorite program for examining metadata is the command line program Exiftool. This Exiftool command will show you all metadata information that's embedded in an image:
$ exiftool -a -S -G0 file-name.file-extension
And this Exiftool command will show you only the color profile information metadata that's embedded in the image, if there is any:
$ exiftool -a -S -G0 -ColorSpace -InteropIndex -WhitePoint -PrimaryChromaticities -Gamma -ICC_Profile:all file-name.file-extension
I used Exiftool to pull out the color profile information from the metadata of three different images so you can see what embedded color space metadata looks like. The first image is an in-camera-generated jpeg which has DCF substitutes for an sRGB ICC color space profile:
The first image (Exiftool output below) contains DCF substitutes for a real ICC profile: the 'EXIF InteropIndex' tag and the 'EXIF ColorSpace' tag. Both substitutes mean the same thing, "use the specified color space profile", which in this case is sRGB: exiftool -a -S -G0 -ColorSpace -InteropIndex -WhitePoint -PrimaryChromaticities -Gamma -ICC_Profile:all IMG_3861.JPG [MakerNotes] ColorSpace: sRGB [EXIF] ColorSpace: sRGB [EXIF] InteropIndex: R98 - DCF basic file (sRGB)
The second image is an in-camera-generated jpeg which has DCF substitutes for an AdobeRGB ICC color space profile. As demonstrated by the second image's metadata, many (possibly all) cameras also add "Makernote" tags, which are camera-manufacturer-specific, non-standard variants of the official DCF tags:
The second image (Exiftool output below) contains three different metadata substitutes for a real ICC profile. The 'EXIF ColorSpace' tag is officially allowed to have only two values, either "sRGB" or "Uncalibrated", which basically means "not sRGB". So many camera manufacturers have added their own private 'MakerNotes' version of the EXIF ColorSpace tag: exiftool -a -S -G0 -ColorSpace -InteropIndex -WhitePoint -PrimaryChromaticities -Gamma -ICC_Profile:all _MG_3860.JPG [MakerNotes] ColorSpace: Adobe RGB [EXIF] ColorSpace: Uncalibrated [EXIF] InteropIndex: R03 - DCF option file (Adobe RGB) [EXIF] WhitePoint: 0.313 0.329 [EXIF] PrimaryChromaticities: 0.64 0.33 0.21 0.71 0.15 0.06 [EXIF] Gamma: 2.2
The third image was produced by a color-managed image editor and has a real embedded ICC profile:
Just below is Exiftool terminal output showing the ICC profile metadata for a jpeg with a real embedded ICC profile. ICC profile metadata information is too long and too varied to be contained in a simple, one-line metadata tag, so all the lines below taken together actually describe just one ICC profile, which happens to be the digiKam "srgb-d65.icm" profile (the specific tags in any given ICC profile vary greatly from one ICC profile to another): $ exiftool -a -S -G0 -ColorSpace -InteropIndex -ICC_Profile:all Image3.jpg [ICC_Profile] ProfileCMMType: lcms [ICC_Profile] ProfileVersion: 2.3.0 [ICC_Profile] ProfileClass: Display Device Profile [ICC_Profile] ColorSpaceData: RGB [ICC_Profile] ProfileConnectionSpace: XYZ [ICC_Profile] ProfileDateTime: 2004:08:13 12:18:06 [ICC_Profile] ProfileFileSignature: acsp [ICC_Profile] PrimaryPlatform: Microsoft Corporation [ICC_Profile] CMMFlags: Not Embedded, Independent [ICC_Profile] DeviceManufacturer: lcms [ICC_Profile] DeviceModel: [ICC_Profile] DeviceAttributes: Reflective, Glossy, Positive, Color [ICC_Profile] RenderingIntent: Perceptual [ICC_Profile] ConnectionSpaceIlluminant: 0.9642 1 0.82491 [ICC_Profile] ProfileCreator: lcms [ICC_Profile] ProfileID: 7fb30d688bf82d32a0e748daf3dba95d [ICC_Profile] DeviceMfgDesc: lcms generated [ICC_Profile] ProfileDescription: sRGB [ICC_Profile] DeviceModelDesc: sRGB [ICC_Profile] MediaWhitePoint: 0.95015 1 1.08826 [ICC_Profile] RedMatrixColumn: 0.43585 0.22238 0.01392 [ICC_Profile] BlueMatrixColumn: 0.14302 0.06059 0.71384 [ICC_Profile] GreenMatrixColumn: 0.38533 0.71704 0.09714 [ICC_Profile] RedTRC: (Binary data 2060 bytes, use -b option to extract) [ICC_Profile] GreenTRC: (Binary data 2060 bytes, use -b option to extract) [ICC_Profile] BlueTRC: (Binary data 2060 bytes, use -b option to extract) [ICC_Profile] ChromaticityChannels: 3 [ICC_Profile] ChromaticityColorant: Unknown (0) [ICC_Profile] ChromaticityChannel1: 0.64 0.33 [ICC_Profile] ChromaticityChannel2: 0.3 0.60001 [ICC_Profile] ChromaticityChannel3: 0.14999 0.06 [ICC_Profile] ProfileCopyright: no copyright, use freely
Several points should be made about the Exiftool output examples given above:
- First, although the example images were all jpegs, other file formats also can hold embedded color space information metadata. Although most digital cameras only save jpegs, some also save tiffs. And after an image has been opened for editing, it can be saved to other file formats, which might (eg tiffs, pngs) or might not (eg ppm) support embedded metadata.
- Second, notice the bracketed letters "[EXIF]" in the terminal output for images one and two above. There are several different types of metadata that might be found in a digital image. Exif metadata is generated according to the Exchangeable image file format, of which DCF information is a part. Apparently the Exif standard is no longer maintained, but camera manufacturers still follow it. Copies of the various Exif and DCF specifications can be downloaded from the (unofficial, by their own description) exif.org website.
- Third, notice the bracketed letters "[MakerNotes]" in the terminal output for images one and two above. Cameras also add "Makernotes" tags, which are camera-manufacturer-specific, non-standard variants and extensions of the various DCF and Exif tags.
- Finally, an actual embedded ICC profile ("[ICC_Profile]" from the third image above) is completely separate from and independent of an image's camera-generated Exif/DCF/Makernotes color profile information. Depending on the particular image editing program, when an ICC profile is embedded, the already-embedded DCF color space information might or might not be removed. And when opening an image with conflicting embedded ICC profile information, there is no guarantee that all image editing applications will prioritize conflicting embedded profile information in the same way. So when dealing with embedded DCF information rather than embedded ICC profiles, "User Beware".
Why don't all images have embedded color profile information?
There are undoubtedly other reasons, but here are four reasons why some images don't have any embedded color profile information:
- As already noted, some file formats (eg ppm) don't support embedded metadata. Some file formats do support embedded metadata, but not necessarily embedded exif information or even ICC profiles. For example, openexr doesn't support embedded exif information; it does support embedded color space information, but not by means of ICC profiles.
- Many images posted on the internet don't have any embedded color profile information. Why? There was a time, not so long ago, when every little bit of extra storage space you could save, and every CPU cycle you could avoid using, really counted (see History of the Very Odd sRGB Color Space). Embedded ICC profiles make images larger by at least a half-kilobyte, sometimes several kilobytes and in the case of LUT profiles, up to a megabyte or even more. As the default ICC profile for the World Wide Web was (and still is) sRGB, it made sense to not embed the sRGB profile in images posted to the web. (As an aside, into today's world of fast computers, cheap ram, cheaper storage, and a plethora of browsers and operating systems that don't always behave as expected when dealing with untagged images, you should always embed an ICC profile in every photograph posted to the web.)
- Also, when you render a raw file into an image file, one possible course of action is to not assign a camera input profile, which leaves the image without any embedded color space information. You, the user, must decide which camera input profile to assign when you open the interpolated raw color image file for editing.
- Sometimes the metadata in an image gets corrupted or otherwise makes it impossible for a given imaging program to open a particular image. An easy fix is to use Exiftool or ImageMagick to strip the metadata out of the image (hopefully using a copy of the image so you can retrieve the metadata). When you strip all the metadata out of an image, naturally the image no longer has any embedded color space information.
Why does it matter whether an image has embedded color profile information?
Non-color-managed browsers and image editors (yes, there are still a few around) don't care whether an image has embedded color profile information. Lacking color management, these programs read the image RGB values and send them straight to the monitor.
Color-managed browsers and image editors behave differently. They convert the image's RGB values from the image's color space to your monitor's color space. That's why color-managed applications can show you more accurate colors than non-color-managed applications. So when an image doesn't have any embedded color profile information, the color-managed application doesn't know what RGB values to send to your monitor. Which is why all color-managed applications make some kind of provision for dealing with untagged images. Usually you, the user, can choose among several options, the most popular of which is "assume sRGB", on the assumption that most untagged images are in fact sRGB images.
Note the word "can" in the phrase "color-managed applications can show you more accurate colors". If you haven't properly calibrated and/or profiled your monitor, then you have no reason to assume that the colors you see on your monitor screen are accurate. If you are using sRGB as the monitor profile for your LCD monitor you should assume that the colors you see are highly inaccurate, for example too magenta in the highlights and too blue everywhere else.