jquery-qrcode
jquery-qrcode copied to clipboard
Ensure the tile width and height values are integers.
This should address the issue here:
https://github.com/jeromeetienne/jquery-qrcode/issues/7
Currently, if the specified width / number of calculated modules is a non-integer value, fillRect() will attempt a sub-pixel draw resulting in artifacts between the rendered tiles.
By flooring the tile width and height, this problem should be alleviated.
can you give some values for me to reproduce this issue ?
The barcode strings I'm working with are about 20 characters long, and I see the artifacts when I try rendering anything with a larger size of 200px.
I see this in Chrome, Safari, and Mobile Safari. Here's what it looks like in Chrome:
http://cl.ly/1y1Q2U01240n3U0K0l37
And here are the parameters I used:
jQuery('#qrcode').qrcode({
render : "canvas",
text : "12345678901234567890",
width : 400,
height : 400
});