Closed patrickjane closed 2 years ago
Hello @patrickjane
most likely it has something to do with the image encoding not being 100% supported by QZXing.
I have a Jolla C with Sailfish 4 so I will give it a try :) (minor note, the Qt version is 5.12 not 5.2 correct ?)
It should be 5.2 (https://sailfishos.org/wiki/Qt).
BTW: I am pretty sure there should be other apps for SailfishOS which are using ZXing/QZXing successfully, so I guess I am making some mistakes on the way.
Indeed you are correct, it seems that 5.2 is the correct.
Regarding your issue, till I find a proper way of integrating the solution, here is what you can do as a workaround. In file QZXingFilter at the following files: https://github.com/ftylitak/qzxing/blob/9973b3dd786298c6389476058639a25020e5507b/src/QZXingFilter.cpp#L183-L187
comment out all lines except line 184:
//#if defined(Q_OS_IOS) || defined (Q_OS_MAC)
uchar* pixel = pixelInit + (y - 1) * captureRect.targetWidth;
//#else
// uchar* pixel = pixelInit + (captureRect.targetHeight - y) * captureRect.targetWidth;
//#endif
Could you give it a try and send me your feedback if it works for you?
I have changed it, and I can confirm everything gets detected now. Thanks for the support!
I might add that, in order to include this project into a SFOS project, I had to add more adjustments, otherwise the install targets would be messed up and I would no longer be able to produce RPMs.
See the patch here https://github.com/patrickjane/harbour-scooter/blob/main/qzxing_sfos_fix.patch
Hello,
I am running SailfishOS 4.1.0.24 (QT 5.2) on a Sony XPeria 10 ii, and I want to read QR codes from within my app. I have included the full project in my project, and I have enabled several switches:
Currently I am trying the
QZXingFilter
like so:Since I had issues with no code beeing detected (
onTagFound
never emitted, anddecodingFinished
signaling failure) I have commented in the debug messages inQZXing::decodeImage()
. This gives me the following output:So now I don't know what to do in order to make it scan the code. For testing, I am using one of those codes.
Could anyone help me out figuring out whats wrong here?