Skip to content

Commit

Permalink
Allow cross-origin canvas image
Browse files Browse the repository at this point in the history
Fixes the issue where reading image from canvas will result in error of having a `tainted` image.
  • Loading branch information
tarun1793 committed Oct 15, 2015
1 parent 67e77fe commit 20aa7ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/qrcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ qrcode.decode = function(src){
else
{
var image = new Image();
image.crossOrigin = "Anonymous";
image.onload=function(){
//var canvas_qr = document.getElementById("qr-canvas");
var canvas_qr = document.createElement('canvas');
Expand Down

1 comment on commit 20aa7ca

@module17
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Please sign in to comment.