Commit 098d3b0e by doszhang

dos

parent b815760a
......@@ -460,20 +460,20 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) {
default:
imgInfo.rotation = 0;
}
var objectImg = new Image();
objectImg.crossOrigin = "Anonymous";
objectImg.setAttribute('crossOrigin', 'anonymous');
img = new Image();
img.crossOrigin = "Anonymous";
img.setAttribute('crossOrigin', 'anonymous');
console.log(img);
objectImg.onload = function () {
img.onload = function () {
if (rotation === 90 || rotation === 270) {
width = objectImg.height;
height = objectImg.width;
width = img.height;
height = img.width;
}
console.log(objectImg);
drawImage(ctx, myCanvas, objectImg, imgInfo);
console.log(img);
drawImage(ctx, myCanvas, img, imgInfo);
}
callback(objectImg);
callback(img);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment