🐛 修正放大图片

This commit is contained in:
fumiama 2022-02-22 13:13:04 +08:00
parent 211f0a667d
commit 598a664d30
2 changed files with 3 additions and 3 deletions

2
data

@ -1 +1 @@
Subproject commit 349cde86290220b8fb3f2bc957d1be58b68c852c
Subproject commit 1e9fcb8ff2eb1855c587fbdb5c2d8a1fd3f885e1

View File

@ -77,8 +77,8 @@ func init() {
if px > 512*512 {
px = int(math.Pow(float64(px), 0.5) + 0.5)
x := im.Bounds().Size().X * px / 512
y := im.Bounds().Size().Y * px / 512
x := im.Bounds().Size().X * 512 / px
y := im.Bounds().Size().Y * 512 / px
ctx.SendChain(message.Text("图片", im.Bounds().Size().X, "x", im.Bounds().Size().Y, "过大,调整图片至", x, "x", y))
im = img.Size(im, x, y).Im
w := binary.SelectWriter()