mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
fix(#335): disable image flatten type conditional
This commit is contained in:
parent
caec4abe65
commit
218f1428c4
1 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue