monich / sailfish-barcode

Barcode reader for Sailfish OS.
https://openrepos.net/content/slava/barcode
13 stars 12 forks source link

[barcode] Replace zxing with zbar #31

Open deepbluev7 opened 2 years ago

deepbluev7 commented 2 years ago

This makes it possible to actually reliably scan the QR code of my COVID certificate.

For some reason zxing fails horribly at scanning my Corona certificate. Because I was interested, I replaced zxing with zbar. That made my cert scan instantly and in general it seems to work more reliably. For that reason I thought I'd share my experiment. This is a really dirty quick replacement. It probably breaks stuff. At least a few of the markers don't seem to get positioned properly. But I'll probably keep using that code, at least for my corona certs. I probably don't want to spend too much effort on this, but if you want to merge it, I'd be willing to clean it up a bit. This doesn't use the zbar build system, but hardcodes what files to build in the project file and uses the config header from my configure run. I really did not want to deal with autotools in a qmake project...

monich commented 2 years ago

Hmm, this is interesting, never heard of this zbar thing before.This stuff doesn't compile though, because src/zbar-config/config.h is missing. I tried to to create one by hand but didn't get very far.

monich commented 2 years ago

Overall this is probably a no-go for this app because from the first glance zbar seems to lack support for important formats like aztec and datamatrix, but it may be quite usable elsewhere (e.g. in Foil Auth) where nothing but QR code is really required. If it works.

deepbluev7 commented 2 years ago

Right, I forgot to add that file, it was already a bit late. And yeah, I can see the missing formats be an issue. I'll probably make a separate app for COVID certs, because I couldn't get them to scan at all with any Sailfish app and I don't want to use an android app just for that.