High-res QR codes

This commit is contained in:
Robert McNally 2012-10-17 23:30:14 -07:00
parent fd3a2ff902
commit b4d732f01b

View file

@ -4366,9 +4366,13 @@
var height = qrcode.getModuleCount() * sizeMultiplier;
// create canvas element
var canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
var scale = 10.0;
canvas.width = width * scale;
canvas.height = height * scale;
canvas.style.width = width + 'px';
canvas.style.height = height + 'px';
var ctx = canvas.getContext('2d');
ctx.scale(scale, scale);
// compute tileW/tileH based on width/height
var tileW = width / qrcode.getModuleCount();
var tileH = height / qrcode.getModuleCount();