scytheStudio / SCodes

This project is Qt & Qml wrapper for ZXing-C++ Library that is used for decoding 1D and 2D barcodes.
https://scythe-studio.com/
Apache License 2.0
107 stars 36 forks source link

Image in the center of QR code #27

Open LateusBetelgeuse opened 1 year ago

LateusBetelgeuse commented 1 year ago

Allow setting an image in the center of the generated QR code. For example, in Telegram Desktop:

imagen

Ideally, this should support any Item-based object (for example, to be able set a lottie animation or a button, progress bar, etc.)

radkoder commented 7 months ago

Hi, This is technically possible now, as the image in the QrCode simply obscures part of the code and relies on the error correction to reconstruct hidden data. (Source: link) So You can just put a Rectangle or Image element in the center of the code, and set high ecc level (8 is max), and it's done.

Since this is as simple as putting an additional QML element on top of the code and also works only for QrCodes, I'm not sure if there is a good way of supporting it on SCodes level. We can maybe add a Proof of Concept in the generator example, but that's about it.