Saved Image always black
joshbatchelor opened this issue · 3 comments
joshbatchelor commented
Fresh Cordova 3.0 project. Only plugin installed and the image that is saved is just solid black. Any ideas?
function onDeviceReady()
{
window.canvas2ImagePlugin.saveImageDataToLibrary(
function(msg){
console.log(msg);
},
function(err){
console.log(err);
},
document.getElementById('myCanvas')
);
}
document.addEventListener('deviceready', this.onDeviceReady, false);
devgeeks commented
Did you put anything in the canvas?
An empty canvas will save as a black image.
Try something like this perhaps?
joshbatchelor commented
Thanks devgeeks and sorry. It was firing before everything loaded, doh!
devgeeks commented
Ah, yes. Glad you worked it out.