tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.23k stars 1.68k forks source link

For second image file, DOM to Image library gives corrupted file #295

Closed iamsahilralkar closed 5 years ago

iamsahilralkar commented 5 years ago

I've created a common component for the dom-to-image library and added into my main component. when the user clicks on the buttons from the main component. the library component gets the data which need to convert into the image. It works great when the user clicks on the first image but when the user clicks on the second image it gives corrupted file.

Please help ASAP

I'm using following function domtoimage.toPng(node) .then(function (dataUrl) {})

Note: it doesn't give error except for the corrupted file and I'm using angular4