Html5 Canvas 将 div 另存为图像(文本显示在图像中而不是图像中)

Html5 Canvas save div as image (text is showing in image but not images)

我正在尝试使用 html5 canvas 拍摄 div 的快照。当我尝试拍摄只有文本数据的 div 的快照时,它工作正常。但是当我尝试在 div 内拍摄图像时,它显示空白的白色图像和文本。

<script type="text/javascript">
    function capture() {
            html2canvas($("#mydiv"), {
             onrendered: function (canvas) {
                $("body").append(canvas);
             }
        });  
    }
   </script>

<div id="mydiv" style="height:400px; width:300px; " >
<img src="noname.jpg">
<p>Very good iamge</p>
</div>

html2canvas 不会显示源自另一个域的图像:

http://html2canvas.hertzen.com/faq.html