High-res QR codes
This commit is contained in:
parent
fd3a2ff902
commit
b4d732f01b
1 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue