ngx_http_image_filter_module loses colour profile information during resizes
|Reported by:||Owned by:|
|Keywords:||color profile, colour profile, ICC, image filter module||Cc:|
|uname -a:||can provide this only via private message or email|
|nginx -V:||can provide this only via private message or email|
All of my images after being resized by this module lose information about their colour profile. This is a serious problem for an image manipulation module. Because of this, images can look too saturated or too pale depending on the device and browser of the end user.
For example, one of my original images has this EXIF parameter: kMDItemProfileName = "sRGB IEC61966-2.1". But it is not set in the resulting image after being resized by the NGINX module.
I use the following 4 configuration parameters for the module:
image_filter resize $arg_size $arg_size;
NGINX version: 1.10.3 (custom build)
Related bug report for GD library (not their fault): https://github.com/libgd/libgd/issues/136
I think you need to add additional step add manually read the old colour profile if set and write it to the new image manually. You cannot rely on GD to do this automatically. See the bottom of that related bug report page for details. This is my understanding.