You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
// ExportWebp exports the image as WEBP to a buffer.
func (r *ImageRef) ExportWebp(params *WebpExportParams) ([]byte, *ImageMetadata, error) {
if params == nil {
params = NewWebpExportParams()
}
paramsWithIccProfile := *params
paramsWithIccProfile.IccProfile = r.optimizedIccProfile
buf, err := vipsSaveWebPToBuffer(r.image, paramsWithIccProfile)
if err != nil {
return nil, nil, err
}
return buf, r.newMetadata(ImageTypeWEBP), nil
}
There should be a check here if the image has it's own ICC profile and it shouldn't be dropped.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: