HTML:
<div id="mesa" style="width:800px; height:800px; float:left; clear:both;">
<div style="width:800px; height:500px; background:#CCC; float:left;">
<img src="http://i.imgur.com/kOhhPAk.jpg"width="800" height="500">
</div>
<div style="width:800px; height:50px; background:#00F; float:left;">texto</div>
</div>
JAVASCRIPT:
$(document).ready(function(){
html2canvas($("#mesa"), {
onrendered: function(canvas){
var imagem = canvas.toDataURL('image/png');
var image = new Image();
image.src = imagem;
$("body").append(image);
}
});
});
If the image src is an image of the server (eg src="image.jpg"), it looks normal, but if it is src="http://sitepage.com/picture.jpg" then he does not get the picture, why does it happen? I need to get the image that way, from another site ... Is there any solution?
Thank you!