Open prashik-s opened 11 months ago
Just had to fix it with OptimizeICCProfile
as well. Also, this code ignores if params.IccProfile
is set by the user.
Thanks. Anyone have energy to create a PR? I'd be happy to merge one.
closes #410
@tonimelisma Can you review?
If the input image already has an ICC Profile embedded into it, the ICC Profile is getting dropped when converting to Webp. This happens if we don't make a call to OptimizeICCProfile . The OptimizeICCProfile function updates the variable optimizedIccProfile. While exporting a Webp, govips looks at the params for ICC Profile. If we don't send an ICC Profile in the export params and the optimizedIccProfile variable is not set, then the ICC Profile of the image is dropped.
Problematic code:
There should be a check here if the image has it's own ICC profile and it shouldn't be dropped.