Colour management and ICC profiles
An ICC profile says how pixel values should be interpreted. It is not another picture. A file can still decode, resize, and encode after the profile is dropped, ignored, or replaced, while the appearance has already left the source.
A profile interprets pixels
Section titled “A profile interprets pixels”Typical source differences:
- Untagged RGB, which each interface may treat as sRGB or as raw channels.
- RGB with an embedded ICC profile, where the caller must keep it, convert it, or strip it on export.
- CMYK, whose channels do not mean the same thing as RGB. Reading it as three-channel RGB produces the wrong colour.
- Wide-gamut spaces such as Display P3, which can be clipped by an sRGB display or encoder while the file remains “valid”.
libvips expresses these conversions with operations such as colourspace and icc_transform. A binding may hide that inside import options, export options, or an explicit call. A function that returns does not prove the documented default actually converted anything.
Ways a result can look successful
Section titled “Ways a result can look successful”- The output opens and has the expected dimensions and band count, but the profile was stripped during export.
- A CMYK input was decoded to some RGB without anyone recording the source and destination profiles.
- A thumbnail path skips colour conversion for speed and the full-size path does not, so the two results diverge.
- One build of libvips includes LittleCMS and another does not, so the same call name does not do the same work.
Each of those claims needs a profile that is really in the input, then the profile name read back from the output, or a positive check that no profile remains. The current sample cannot supply that.
Evidence this handbook does not have
Section titled “Evidence this handbook does not have”The executed JPEG is an ordinary 3-band photograph. It cannot prove a CMYK, P3, or ICC round trip. Until a redistributable profiled sample exists:
- do not claim that a conversion to sRGB preserved colour;
- do not compare colour pixels across the four bindings;
- do not use the transparency figure on the alpha page as a colour-management sample.
Start colour-shift diagnosis at colour shift. Transparency is a separate line: bands, alpha, and transparency.