I am trying to save screenshot of image using html2canvas. Below is my code:
var a = document.getElementById('a2')
html2canvas(document.getElementById('a1'), {
onrendered: function(canvas) {
var img = canvas.toDataURL("image/jpeg");
window.open(img);
}
}
However, the code is saving the screenshot for local image. But for the image from external source like : http://europa.promaticstechnologies.com/QuotePic/img/QuotePro/bg1.jpg giving me black screenshot. Please assist.