heuer/segno

Anybody knows why this library do not let me create miniqr of this size?

Closed this issue · 5 comments

image
(I got this from this page https://barcode.tec-it.com/en/MicroQR?data=99999)
The smaller qr i can create is:

99999L

(I am not referring to the size of the image, i refer to the quantity of rows. )

heuer commented

Please provide more details. Segno creates M1 Micro QR codes if the input fits.

>>> import segno 
>>> qr = segno.make(99999)  # Doesn't matter if the data is provided as int or str, btw
>>> qr.designator
'M1'
>>> qr.save('99999.png', scale=3)

Result:
99999

>>> qr.save('99999.png', scale=24)

99999

heuer commented

The provided Micro QR code utilizes version M2. Data: 18848. I don't know why or how you created it, I get the following results:

>>> import segno
>>> qr = segno.make('18848')
>>> qr.designator
'M1'
>>> qr.save('m1-18848.png', scale=6)
>>> qr = segno.make('18848', version='m2')
>>> qr.designator
'M2-M'
>>> qr.save('m2-18848.png', scale=6)

M1
m1-18848

M2
m2-18848

Ok i understand.

My code was.
qr = segno.make_micro("99999",error = 'L',boost_error =False)

So the 'M1' has zero of correction level?

heuer commented

That's correct, M1 has no error correction. It can only take up to five numeric chars.

IMO it makes no sense to disable boost_error unless you encounter a performance problem. With boost_error=True (default) you'll get the best error correction level without changing the version / symbol size

Thanks for that info!