Color profiles in JPGs and PDFs — sRGB, Display P3, Adobe RGB
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
- sRGB (1999, IEC 61966-2-1): the default web color space, the assumption when no profile is present, the gamut of cheap LCD monitors. Covers about 35% of human-visible color.
- Display P3 (Apple, since iPhone 7 / 2016): about 25% wider than sRGB, with deeper reds and greens. Default capture space for iPhones; rendered correctly on Mac Retina displays, Apple Silicon, and modern Android.
- Adobe RGB (1998): about 50% wider than sRGB. Designed to cover the gamut of most CMYK printers, hence its prevalence in print workflows. Native to professional cameras shooting in "Adobe RGB mode".
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:
/DeviceRGB— "trust the device", typically interpreted as sRGB by viewers. Default and most common./CalRGB— calibrated RGB defined inline by gamma and white point. Rare in modern PDFs./ICCBased N R— a reference to an embedded ICC profile stream. The full, modern, color-managed approach.
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:
- JPEG's CMYK encoding has historical inversion bugs (Adobe wrote CMYK JPEGs with inverted color values for a decade; some readers compensate, others don't).
- PDF's
/DCTDecodeimplementations sometimes assume YCbCr or grayscale and corrupt CMYK input.
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.