Skip to content
Browse files

Merge pull request #11 from oleksiy-nesterov/master

Base 64
  • Loading branch information...
2 parents 1c44b94 + 7145d93 commit 07c0c13cc11fb69bbbfeb5f3a539bc20cb62a241 @niklasvh committed
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/Images.js
View
10 src/Images.js
@@ -50,7 +50,15 @@ html2canvas.prototype.preloadImage = function(src){
if (this.getIndex(this.images,src)==-1){
- if (this.isSameOrigin(src)){
+ if(src.substr(0, 5) == 'data:'){
+ //Base64 src
+ this.images.push(src);
+ var img = new Image();
+ img.src = src;
+ this.images.push(img);
+ this.imagesLoaded++;
+ this.start();
+ }else if (this.isSameOrigin(src)){
this.images.push(src);
// console.log('a'+src);
var img = new Image();

0 comments on commit 07c0c13

Please sign in to comment.
Something went wrong with that request. Please try again.