소스 검색

Don't copy memory after fixing image size

DarthSim 2 년 전
부모
커밋
4ca72ea9cc
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      processing/fix_size.go

+ 3 - 3
processing/fix_size.go

@@ -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 {