1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-12-23 22:11:10 +02:00
Files
imgproxy/processing/flatten.go

10 lines
189 B
Go
Raw Permalink Normal View History

2021-04-26 17:52:50 +06:00
package processing
func (p *Processor) flatten(c *Context) error {
2025-09-23 20:16:36 +03:00
if !c.PO.ShouldFlatten() && c.PO.Format().SupportsAlpha() {
2021-04-26 17:52:50 +06:00
return nil
}
2025-09-23 20:16:36 +03:00
return c.Img.Flatten(c.PO.Background())
2021-04-26 17:52:50 +06:00
}