Image::thumbnail
and color profile normalisation
#266
-
Hi. I saw this in the libvips docs:
I'm using These are the options I'm using at the moment: 'jpeg' => [
'quality' => 80,
'keep' => 'none',
'optimize_coding' => true,
'export_profile' => 'srgb', // <------------ is this correct / necessary?
], Also, are the options the same for JPG2000 files? Just wondering if I need to handle them differently or if I can use the same settings. Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi @binaryfire, For thumbnails you generally want to either strip profiles (and get the default sRGB rendering), or transform to a known space, like adobe98 or one of the HDR spaces. This is because colour profiles can be extremely large, for example:
You absolutely do not want 500kb thumbnails. The You can experiment at the CLI:
So the CMYK JPEG is transformed to profile-less sRGB. |
Beta Was this translation helpful? Give feedback.
Setting the export profile does the colour conversion, so if you set
p3
, for example, you'll get an image in p3 space and with a p3 profile attached to it.Yes, it's
export_profile
in PHP.Yes, you can use the colour options for jp2k load and save, they just won't do anything, since profile support in jp2k is so poor. You can't set things like
optimise_coding
for jp2k though.