Simple-HTML5-Drawing-App icon indicating copy to clipboard operation
Simple-HTML5-Drawing-App copied to clipboard

toDataURL only grabs half the image...

Open boutzamat opened this issue 6 years ago • 0 comments

Hey. Awesome work.

I am trying to implement this in my website, but when i try to save the canvas value and display it in the browser (or in a base64 decoder) both only shows half the image.

I tried with other drawing applications and the value gets displayed correctly in the browser and base64 decoder.

var dataurl = canvas_simple.toDataURL(); console.log(dataurl); If you copy the console.log value and paste it in your browser URL or even a base64 decoder (https://codebeautify.org/base64-to-image-converter) you can see that the full image isn't there.

boutzamat avatar Dec 13 '19 00:12 boutzamat