1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00

Don't copy memory after fixing image size

This commit is contained in:
DarthSim 2023-02-16 01:14:03 +03:00
parent c786bde2c1
commit 4ca72ea9cc

View File

@ -32,7 +32,7 @@ func fixWebpSize(img *vips.Image) error {
log.Warningf("WebP dimension size is limited to %d. The image is rescaled to %dx%d", int(webpMaxDimension), img.Width(), img.Height())
return img.CopyMemory()
return nil
}
func fixGifSize(img *vips.Image) error {
@ -53,7 +53,7 @@ func fixGifSize(img *vips.Image) error {
log.Warningf("GIF resolution is limited to %d and dimension size is limited to %d. The image is rescaled to %dx%d", int(gifMaxResolution), int(gifMaxDimension), img.Width(), img.Height())
return img.CopyMemory()
return nil
}
func fixIcoSize(img *vips.Image) error {
@ -70,7 +70,7 @@ func fixIcoSize(img *vips.Image) error {
log.Warningf("ICO dimension size is limited to %d. The image is rescaled to %dx%d", int(icoMaxDimension), img.Width(), img.Height())
return img.CopyMemory()
return nil
}
func fixSize(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {