fix: don't use naturalWidth/Height

fixes #219
This commit is contained in:
Maya 2026-02-11 22:07:29 +03:00
parent da39283e08
commit 06d7cfaad9
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -314,10 +314,10 @@ export class MagickConverter extends Converter {
return new Promise((resolve, reject) => {
img.onload = () => {
try {
canvas.width = img.naturalWidth || width;
canvas.height = img.naturalHeight || height;
canvas.width = width;
canvas.height = height;
ctx.drawImage(img, 0, 0);
ctx.drawImage(img, 0, 0, width, height);
canvas.toBlob((blob) => {
URL.revokeObjectURL(svgUrl);