-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
I am using deno-canvas for making a test image and i was using a svg image url to load image but whenever i try to load image it throws me a error Invalid Image. But when using nodejs's canvas it works fine. Is the problem with svg or something? Here is my code to reproduce the error:
import Canvas, { dataURLtoFile, loadImage } from 'https://deno.land/x/canvas@v1.1.3/mod.ts';
ctx.fillStyle = '#7298da';
ctx.fillRect(0, 0, 800 - 20, 800 - 20);
ctx.fillStyle = 'white';
await ctx.drawImage(await loadImage('https://weboverhauls.github.io/demos/svg/checkmark.svg'), 0, 0);
Deno.writeFileSync("test.png", dataURLtoFile(canvas.toDataURL()))gustavopchVictorHAS
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed