Skip to content

Commit

Permalink
Merge pull request niklasvh#11 from oleksiy-nesterov/master
Browse files Browse the repository at this point in the history
Base 64
  • Loading branch information
niklasvh committed Sep 5, 2011
2 parents 1c44b94 + 7145d93 commit 07c0c13
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Images.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 07c0c13

Please sign in to comment.