mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 20:22:31 +02:00
Reduce memory usage when scaling down animated images
This commit is contained in:
@@ -606,6 +606,10 @@ func (img *Image) Resize(wscale, hscale float64) error {
|
||||
return Error()
|
||||
}
|
||||
|
||||
if wscale < 1.0 || hscale < 1.0 {
|
||||
C.vips_image_set_int(tmp, cachedCString("imgproxy-scaled-down"), 1)
|
||||
}
|
||||
|
||||
C.swap_and_clear(&img.VipsImage, tmp)
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user