lincolnloop / python-qrcode

Python QR Code image generator
https://pypi.python.org/pypi/qrcode
Other
4.36k stars 666 forks source link

Suggestion: Add title parameter #199

Closed GadgetSteve closed 3 years ago

GadgetSteve commented 4 years ago

When producing multiple QR codes it is very handy to include in the image some text to describe which one is which, currently the only way to do this is to add the title manually using an image/svg editor or with image magick.

It would be great if there was a --title= parameter that allowed us to specify some text to have centred in the bottom border. An example is attached. okta_android

angeluisq commented 4 years ago

hi, you have a solution to issue?

heuer commented 4 years ago

In my opinion, such a feature is a bit questionable, as QR codes can hold a lot of data. You can also easily do this with Pillow. Here you can find an example, this should be easy to adapt to python-qrcode: https://github.com/heuer/segno/blob/master/examples/qrcode_text/png_text.py

Results: a-day-in-the-life-1 a-day-in-the-life-2 a-day-in-the-life-2 a-day-in-the-life-3 a-day-in-the-life-4

heuer commented 4 years ago

Example to generate an additional text for SVG output: https://github.com/heuer/segno/blob/master/examples/qrcode_text/svg_text.py

rain-1 rain-2 rain-3 rain-4 rain-6

heuer commented 4 years ago

See also https://github.com/lincolnloop/python-qrcode/issues/91

kumkaning commented 3 years ago

good

kumkaning commented 3 years ago

:sunglasses: