From 218f1428c4fb36c4edbb23216dbfaaa6681d2a5b Mon Sep 17 00:00:00 2001 From: Tomas Date: Mon, 8 Jun 2020 18:05:35 +0200 Subject: [PATCH] fix(#335): disable image flatten type conditional --- resizer.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resizer.go b/resizer.go index 461af5e..8d04b18 100644 --- a/resizer.go +++ b/resizer.go @@ -393,8 +393,7 @@ func watermarkImageWithAnotherImage(image *C.VipsImage, w WatermarkImage) (*C.Vi } func imageFlatten(image *C.VipsImage, imageType ImageType, o Options) (*C.VipsImage, error) { - // Only PNG images are supported for now - if o.Background == ColorBlack || (imageType != PNG && imageType != HEIF && imageType != WEBP) { + if o.Background == ColorBlack { return image, nil } return vipsFlattenBackground(image, o.Background)