Commit Graph

2 Commits

Author SHA1 Message Date
Romain Porte b648cfd67f First attempt at centering images and QRs (#250)
This was tested on ZJ-5890 with success. By default centering is
deactivated for backward compatibility. Trying to center a QR code in
native mode will raise an exception as we do not know ATM if the native
rendering is centered by default or not.

* Added basic tests for center feature

* Check image size before centering
2017-08-31 09:25:35 +02:00
Romain Porte 5bd6dcf471 Ensure QR codes have a border large enough (#235)
*  Ensure QR codes have a border large enough
(The QR code spec requires a border at least 4*box_size thick but we can't
 just set border=16 because that results in a QR code more than 255px tall
 and I'm not yet ready to use fullimage() as a backend for it)
This fix was originally commited by Stephan Sokolow on 2014-05-22
* Let the user print stuff using qr example
* fix tests
2017-07-24 15:04:54 +02:00