marcoagner / Flask-QRcode

A concise Flask extension to easily render QR codes on Jinja2 templates using python-qrcode.
https://marcoagner.github.io/Flask-QRcode/
GNU General Public License v3.0
110 stars 30 forks source link

Insert small image to QR Code #13

Closed 1dot75cm closed 7 years ago

1dot75cm commented 8 years ago

I think, it's very useful. It have following new features:

For example:

<img src="{{ qrcode(request.url, fill_color="#aaa", back_color="white") }}">
<img src="{{ qrcode(url_for('.post', id=post.id, _external=True), border=1, factor=5, icon_img="https://example.org/fedora.png", box=(50, 100)) }}">

The icon_img will be find image in static directory. The factory will adjust the image size to one-fifth of QRCode. The box will be set left: 50px and top: 100px for small icon.

Please visit blog to check QR Code image. @marcoagner

https://repo.fdzh.org/blog/api/v1.0/qrcode?url=https://www.google.com&version=10&correct=H&box_size=4&border=2&bcolor=ccc&fcolor=blue&icon=https://avatars0.githubusercontent.com/u/8544397&box=30,65

1dot75cm commented 7 years ago

Hi, @marcoagner Please review this pull request. Thanks.

marcoagner commented 7 years ago

Thank you, @1dot75cm! Just reviewed it and loved the new features. :+1: Updating pip right away. Check 26d2e732ed551252a3a51ed3fadb1625f215aea9 ;)