offline-qr-code icon indicating copy to clipboard operation
offline-qr-code copied to clipboard

Adjust QR code size based on QR code content?

Open rugk opened this issue 6 years ago • 4 comments

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:

  • some research/ a formular/limit, which size is recommend for a QR code with a given input
  • implementation to automatically adjust the size when the popup is shown ("at startup")
  • maybe experiment with how it looks/works when we dynamically adjust the size, even when the user later enters more characters

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:

rugk avatar May 22 '18 10:05 rugk

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.

tjbrooks avatar May 25 '18 15:05 tjbrooks

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:

rugk avatar May 25 '18 16:05 rugk

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

tjbrooks avatar May 25 '18 22:05 tjbrooks

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.

rugk avatar May 26 '18 09:05 rugk