mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-01-08 10:45:04 +02:00
Always flatten if the resulting format does not support alpha
This commit is contained in:
parent
965cd68ecf
commit
98ee337b00
@ -432,7 +432,7 @@ func transformImage(ctx context.Context, img *vipsImage, data []byte, po *proces
|
||||
|
||||
transparrentBg := po.Format.SupportsAlpha() && !po.Flatten
|
||||
|
||||
if hasAlpha && (po.Flatten || po.Format == imageTypeJPEG) {
|
||||
if hasAlpha && !transparrentBg {
|
||||
if err = img.Flatten(po.Background); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user