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:
parent
c786bde2c1
commit
4ca72ea9cc
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user