rugk / offline-qr-code

📱 Browser add-on allowing you to quickly generate a QR code offline with the URL of the open tab or other text!
https://addons.mozilla.org/firefox/addon/offline-qr-code-generator/?utm_source=github.com&utm_medium=github&utm_content=github-url-description&campaign=github-url-description
Other
425 stars 129 forks source link

Adjust QR code size based on QR code content? #90

Open rugk opened 6 years ago

rugk commented 6 years ago

E..g. if one has a long URL the QR code will get very small compared to when you have a short URL.

This is especially worse, if you use the Canvas version, as the Canvas version does it's stuff pixel-perfect "crisp" or how it is called…). In this case, the QR code can get very much smaller…

Scanning small QR codes is hard when they contain much data…

this requires:


Edit (2019-05-20): The original idea was to implement this as an option. I am not sure about this, anymore.

For anyone to notice the problem, just take the default size and try to enter different lengths of text and try to scan them:

small vs large

If the application were clever™, it could automatically prevent this. :smile:

tjbrooks commented 6 years ago

Hello, I am new here, but I noticed this issue when first using the addon.

After changing the default setting of error correction level from Q to H in common.js locally. I found the QR code doesn't change size as data increases.

This does not change the fact that a QR code with a significant amount of data may be hard to scan at 200 px.

rugk commented 6 years ago

from Q to H in common.js locally

Did you notice there is actually a setting for it? So you do not need to adjust the JS for that.… :smile:

tjbrooks commented 6 years ago

My apologies, I see now what really fixed the resizing is SVG.

rugk commented 6 years ago

It actually should not, or… to put in in another way: This issue here is about something else. Don't know what bug you experienced with the Canvas option.