Closed erdmann closed 1 year ago
Hi Rob,
It'll fall back to one of the profiles embedded in libvips:
https://github.com/libvips/libvips/tree/master/libvips/colour/profiles
Is this an RGB JPEG? In which case it'll be that sRGB profile.
Perhaps this is a D65 / D50 difference? sRGB is officially D65, but most sRGB profiles are actually D50.
Indeed it could be the D50/D65 difference; I hadn't thought of that.
I have vague recollections that doing icc_import
without an embedded or explicitly-specified profile used to throw an error. Did the default behavior change at some point? In any case, please consider this a minor documentation request so that the fallback to those profiles in the case where neither embedded nor explicitly specified (with input_profile=...
) is stated.
Many thanks again.
You can see the logic here:
https://github.com/libvips/libvips/blob/master/libvips/colour/icc_transform.c#L670-L750
You're right, the docs have fallen behind a bit. I'll update them.
I had a go: https://github.com/libvips/libvips/commit/efed966147d0effa41510ea83c85b2c8fa18e857
Thanks for the suggestion!
You never cease to amaze, John!
Hi,
I recently ran
pyvips.Image.icc_import
on an image that didn't have a color profile and I was surprised to find that the command still worked. I expected an error, but after reading the documentation I see that the embedded option is only engaged if it's possible. I couldn't find documentation on what profile it's implicitly assuming, so I did a little (possibly flawed) experiment using numpy and pyvips:If Wikipedia can be trusted (?), this is close to, but not the same as, the sRGB primaries and whitepoint. In particular, the blue primary is listed there as x=0.15, y=0.06 while the value calculated above is x=0.12, y=0.05. At any rate I'm confused about the expected behavior when using
icc_import
without a color profile and whether the above is the expected output.Many thanks in advance!