From 7145d9303d43213807e1b7e2d3944e51d2000de1 Mon Sep 17 00:00:00 2001 From: Oleksiy Nesterov Date: Tue, 23 Aug 2011 05:53:07 +0300 Subject: [PATCH] Edited src/Images.js via GitHub --- src/Images.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Images.js b/src/Images.js index 1084ef0..2f41a5f 100644 --- a/src/Images.js +++ b/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();