From a7f91c23cdd614682f91dfc9ec037e97ce93ec59 Mon Sep 17 00:00:00 2001 From: JokerTrickster Date: Mon, 7 Oct 2024 14:34:22 +0900 Subject: [PATCH] =?UTF-8?q?{improvement}=20-=20=EC=9D=B4=EB=AF=B8=EC=A7=80?= =?UTF-8?q?=20=EC=9B=90=EB=B3=B8=20=EC=82=AC=EC=9D=B4=EC=A6=88=20=EC=9C=A0?= =?UTF-8?q?=EC=A7=80=ED=95=98=EA=B3=A0=20=EB=B3=80=ED=98=95=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20\n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/aws/s3.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/aws/s3.go b/src/utils/aws/s3.go index c333d95..79f586b 100644 --- a/src/utils/aws/s3.go +++ b/src/utils/aws/s3.go @@ -19,7 +19,7 @@ var imgMeta = map[ImgType]imgMetaStruct{ bucket: func() string { return "dev-food-recommendation" }, domain: func() string { return "dev-food-recommendation.s3.ap-northeast-2.amazonaws.com" }, path: "images", - width: 512,//512 x 341 + width: 512, //512 x 341 height: 341, expireTime: 2 * time.Hour, }, @@ -58,7 +58,8 @@ func ImageUpload(ctx context.Context, file *multipart.FileHeader, filename strin img = imaging.Resize(img, meta.width, meta.height, imaging.Lanczos) } } else { - img = imaging.Fill(img, meta.width, meta.height, imaging.Center, imaging.Lanczos) + img = imaging.Fit(img, meta.width, meta.height, imaging.Lanczos) + //img = imaging.Fill(img, meta.width, meta.height, imaging.Center, imaging.Lanczos) } buf := new(bytes.Buffer)