erwanvivien / fast_qr

Ultra fast QRCode generation
https://fast-qr.com/
MIT License
197 stars 29 forks source link

Transparent backgrounds #12

Closed jorian closed 1 year ago

jorian commented 1 year ago

First of all, great crate, I'm using it in a Discord bot.

Discord has 2 themes, dark and light. I would want to use a module color that fits both dark and light, but in order to do that, I need transparent backgrounds.

In your opinion, how hard would that be to make? I looked into the SVG this crate worked with, but didn't see any transparency options at first glance.

If in your opinion it shouldn't be so hard, I might want to take a stab at it :)

erwanvivien commented 1 year ago

Hello @jorian it is indeed possible i believe and I overlooked it, I will put some time to make the feature, you can also check how it is done internally, it is not so complex !

erwanvivien commented 1 year ago

I believe d0300c944ba6e7d112fffae881c415c6bdb823ff fixes what you want, I'll push a version :)

erwanvivien commented 1 year ago

fast_qr 0.7.1 is now available at crates.io with transparancy

jorian commented 1 year ago

Awesome, I was already fiddling with that 4th number as I assumed it would be opacity, but it just wasn't implemented yet.

Thanks a ton!

erwanvivien commented 1 year ago

No problem 👍