mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
🐛 修正放大图片
This commit is contained in:
parent
211f0a667d
commit
598a664d30
2
data
2
data
@ -1 +1 @@
|
||||
Subproject commit 349cde86290220b8fb3f2bc957d1be58b68c852c
|
||||
Subproject commit 1e9fcb8ff2eb1855c587fbdb5c2d8a1fd3f885e1
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user