Fix trimming of CMYK images

This commit is contained in:
DarthSim
2022-06-23 17:59:04 +06:00
parent a44e8dc94b
commit 7a5074187e
4 changed files with 39 additions and 18 deletions

View File

@@ -11,6 +11,11 @@ func trim(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions,
return nil
}
// We need to import color profile before trim
if err := importColorProfile(pctx, img, po, imgdata); err != nil {
return err
}
if err := img.Trim(po.Trim.Threshold, po.Trim.Smart, po.Trim.Color, po.Trim.EqualHor, po.Trim.EqualVer); err != nil {
return err
}