Skip to content

Commit feeb257

Browse files
author
GyDi
authored
修复图片压缩缩放的 bug (#521)
* 修复图片压缩缩放的 bug
1 parent 8d26b7c commit feeb257

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils/compress.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ class Compress {
135135
canvas.height = height
136136

137137
this.clear(context, width, height)
138+
context.save()
138139
context.transform(...matrix)
139140
context.drawImage(img, 0, 0)
141+
context.restore()
140142
resolve(canvas)
141143
})
142144
})

0 commit comments

Comments
 (0)