Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/jquery.qrcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@
ctx.fillRect(Math.round(col*tileW),Math.round(row*tileH), w, h);
}
}
// return just built canvas
return canvas;

// make an image from the canvas
var img = document.createElement('img');
img.src = canvas.toDataURL('image/png');
img.width = options.width;
img.height = options.height;
// return just built img
return img;
}

// from Jon-Carlos Rivera (https://github.com/imbcmdth)
Expand Down