From 6367907e79729812d52f9e64a21949b31b42e59a Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Wed, 6 Sep 2023 18:28:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=9B=BE=E7=89=87=E7=BC=A9=E7=95=A5?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/internal/logic/logoresizelogic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/resource/internal/logic/logoresizelogic.go b/server/resource/internal/logic/logoresizelogic.go index a1b128e6..c405915d 100644 --- a/server/resource/internal/logic/logoresizelogic.go +++ b/server/resource/internal/logic/logoresizelogic.go @@ -11,7 +11,7 @@ import ( "fusenapi/utils/file" "fusenapi/utils/hash" "image" - "image/jpeg" + "image/png" "io" "net/http" @@ -91,7 +91,7 @@ func (l *LogoResizeLogic) LogoResize(req *types.LogoResizeReq, userinfo *auth.Us } emptyBuff := bytes.NewBuffer(nil) //开辟一个新的空buff - jpeg.Encode(emptyBuff, src, nil) //img写入到buff + png.Encode(emptyBuff, src) //img写入到buff var hashKeyDataMap = make(map[string]interface{})