mirror of https://github.com/VERT-sh/VERT.git
parent
da39283e08
commit
06d7cfaad9
|
|
@ -314,10 +314,10 @@ export class MagickConverter extends Converter {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
img.onload = () => {
|
img.onload = () => {
|
||||||
try {
|
try {
|
||||||
canvas.width = img.naturalWidth || width;
|
canvas.width = width;
|
||||||
canvas.height = img.naturalHeight || height;
|
canvas.height = height;
|
||||||
|
|
||||||
ctx.drawImage(img, 0, 0);
|
ctx.drawImage(img, 0, 0, width, height);
|
||||||
|
|
||||||
canvas.toBlob((blob) => {
|
canvas.toBlob((blob) => {
|
||||||
URL.revokeObjectURL(svgUrl);
|
URL.revokeObjectURL(svgUrl);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue