mireq / reportlab-qr-code

QR code plugin for reportlab RML language
MIT License
6 stars 2 forks source link

How to save as png or jpg format? #2

Open lhh8713 opened 1 month ago

lhh8713 commented 1 month ago

How to save as png or jpg format?

mireq commented 1 month ago

Reportlab doesn't support bitmap files, but you can use convert to make bitmap pictures:

echo "ok"|python -m reportlab_qr_code|convert pdf:- /tmp/code.png

I don't know if i will be able to do rasterization using Drawing module.

mireq commented 1 month ago

I have added --format PNG option, but gradient is not supported, because Drawing class don't support masking. And gradients probably too.