Skip to content

Commit 07c0c13

Browse files
committed
Merge pull request niklasvh#11 from oleksiy-nesterov/master
Base 64
2 parents 1c44b94 + 7145d93 commit 07c0c13

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Images.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,15 @@ html2canvas.prototype.preloadImage = function(src){
5050

5151

5252
if (this.getIndex(this.images,src)==-1){
53-
if (this.isSameOrigin(src)){
53+
if(src.substr(0, 5) == 'data:'){
54+
//Base64 src
55+
this.images.push(src);
56+
var img = new Image();
57+
img.src = src;
58+
this.images.push(img);
59+
this.imagesLoaded++;
60+
this.start();
61+
}else if (this.isSameOrigin(src)){
5462
this.images.push(src);
5563
// console.log('a'+src);
5664
var img = new Image();

0 commit comments

Comments
 (0)