← Blog

Color profiles in JPGs and PDFs — sRGB, Display P3, Adobe RGB

A pixel value (255, 0, 0) means different physical reds in different color spaces sRGB IEC 61966-2-1, 1999 "the standard" covers ~35% of CIE 1931 Display P3 Apple, since iPhone 7 ~25% wider than sRGB deeper reds and greens Adobe RGB Adobe, 1998 (print) ~50% wider than sRGB covers most CMYK printer gamuts

A pixel in a JPEG is three numbers: red, green, blue, each 0–255. But "red = 255" is meaningless without a reference: which red? A 6500 K daylight pure red? An LED-monitor primary at 615 nm? The answer is encoded in the image's color profile, also called an ICC profile. Get it wrong and the same pixel renders as different physical colors on different devices.

Three modern color spaces

How the profile is stored in JPEG

JPEG carries an ICC profile in an APP2 marker segment near the start of the file. The profile is a binary blob defining the color space mathematically: gamut primaries, white point, gamma curves, transformation matrices.

If APP2 is present and contains an ICC profile, the JPEG is "tagged". A profile-aware viewer reads the tag and converts pixel values from that space to the display space. If no profile is present, the viewer assumes sRGB and renders the pixels directly.

The untagged photo problem

Most JPEGs from older cameras or smartphones save without ICC profiles, relying on "everyone assumes sRGB". This works on sRGB monitors. On a wide-gamut display (modern Mac, recent iPhone), the OS renders untagged JPEGs assuming sRGB anyway — colors look correct.

But: an iPhone capturing in Display P3 mode does embed a profile. Open the file on a wide-gamut monitor in a profile-aware viewer (Photos.app, Safari, modern Photoshop) and you see Display P3 colors — deeper reds, more saturated foliage. Open it in a profile-unaware viewer and the wide-gamut pixels are interpreted as sRGB and look weirdly oversaturated.

What PDF does with color

PDF's Image XObject can declare its color space explicitly:

For maximum fidelity, the conversion preserves any ICC profile embedded in the input JPEG: when the source JPEG carries an iCCP-style profile, the resulting PDF's Image XObject typically declares /ICCBased and the profile bytes ride along with the page. Viewers that respect ICC will render the photo with its original color intent.

Untagged input → untagged output

If the input JPEG has no ICC profile, JPG2PDF doesn't make one up. The Image XObject uses /DeviceRGB. PDF readers will assume sRGB (per the PDF/A and ICC v4 conventions) and the output should look identical to the input on the same display.

For most photos from most phones taken in default mode, this is fine. For pro photos shot in Display P3 or Adobe RGB and tagged accordingly, the embedded profile is preserved and the color is preserved.

CMYK JPEGs

JPEG can carry CMYK pixel data instead of RGB, used in print pre-press workflows. PDF can also handle CMYK natively (/DeviceCMYK or an ICC-tagged CMYK profile). However, the path is fragile:

CMYK JPEGs may convert to an RGB Image XObject in the output PDF rather than passing through as native CMYK — the underlying conversion library decides based on its CMYK-handling capabilities. Expect the result to be predictable for screen viewing but not suitable for print pre-press. If you need a CMYK PDF for print production, build it in a professional pre-press tool with explicit CMYK handling.

How to check a JPEG's profile

Use any metadata-inspection tool that exposes EXIF/ICC fields and look for ICC_Profile. Most show profile name (e.g. "Display P3", "sRGB IEC61966-2.1") or simply byte size. If the inspector reports nothing for ICC_Profile, the photo is untagged.