Hi, I've just added sketch.js on my project and it works greats!
I have only one problem: I need to store the image 'sketched' in my db but if I can to try to get it I obtain a blank image :-(
How I can do it?
With this code toDataURL is always the same and represent a blank image
....
canvas = document.getElementById('canvasDiv');
var ctx = canvas.getContext("2d");
canvas.width = '100';
canvas.height = '50';
dataPicture = canvas.toDataURL("image/png");
newPicture = dataPicture.replace('data:image/jpeg;base64,', '');
...
Hi, I've just added sketch.js on my project and it works greats! I have only one problem: I need to store the image 'sketched' in my db but if I can to try to get it I obtain a blank image :-( How I can do it? With this code toDataURL is always the same and represent a blank image .... canvas = document.getElementById('canvasDiv'); var ctx = canvas.getContext("2d"); canvas.width = '100'; canvas.height = '50'; dataPicture = canvas.toDataURL("image/png"); newPicture = dataPicture.replace('data:image/jpeg;base64,', ''); ...