Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Feature! #51

Open
peterroe opened this issue Aug 8, 2022 · 6 comments
Open

New Feature! #51

peterroe opened this issue Aug 8, 2022 · 6 comments

Comments

@peterroe
Copy link

peterroe commented Aug 8, 2022

I want to do something with this nice repo: support config of size.

Such as:

$ qrcode-terminal https://github.com/peterroe -w 300
$ qrcode-terminal https://github.com/peterroe -w 100

It will output QRcode with different size.

@filimonic
Copy link

filimonic commented Nov 23, 2023

How it is expected to work?

QR codes have 40 standard sizes (called versions), each size have it's own dimensions in modules (squares).
Sizes vary from version 1 (21x21) to 40 (177x177).

Also each QR code has capacity, varying from 72 bits (code version 1, error correction level H) to 23648 bits (code version 40, error correction L)

The minimal size (version) of QR Code for specific data depends on error correction level only.
If you make QR code with higher version (size in modules) than it needs to be, it is just a waste of capacity.

So, on-screen QR code size may me scaled up only by multiplying by natural number (x2, x3,...) (make each module fill 1x1 on-screen cell, 2x2, 3x3 etc.)

@peterroe
Copy link
Author

Well. Can we reduce the size of the QR code by reducing the error tolerance? My original claim is actually that my console is small enough to output the QR code on a single screen.

@filimonic
Copy link

Well. Can we reduce the size of the QR code by reducing the error tolerance? My original claim is actually that my console is small enough to output the QR code on a single screen.

When using command line mode, it seems that L (lowest) ErrorCorrection level is used. You can not specify EC level using command line now, and you can not drop EC level below L

@filimonic
Copy link

filimonic commented Nov 24, 2023

You can reduce QR code size by reducing dsts by changing alphabet used in data.

Sizing is Byte mode > Alphanumeric mode (A-Z upper, 0-9, some special chars) > Numbers only.

@peterroe
Copy link
Author

Hi. Thanks for your reply. I have a question, Where I can do this:

Sizing is Byte mode > Alphanumeric mode (A-Z upper, 0-9, some special chars) > Numbers only.

@filimonic
Copy link

filimonic commented Nov 24, 2023

UPD My bad.
It SHOULD be switched automatically. Encoding phrases 1234567890, ABCDEFGHIJ, abcdefghij SHOULD give different amount of bits => this amount may fit different QR code sizes. 123... is encoded using Numerical, and it is smallest. ABC... is encoded using alphanumerical. abc... is encoded using Byte and is largest

But instead, author decided to use always Byte encoding, and this is why it is not working for this tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants