qrtool icon indicating copy to clipboard operation
qrtool copied to clipboard

Nothing returned when decoding a QR code

Open johnnynoone opened this issue 11 months ago • 5 comments

Checklist

  • [X] I have searched the existing issues

Describe the bug

I have an image of a QR code, qrtool fails to decode it.

To Reproduce

  1. Download the image: IMG_20250114_004856_899
  2. Run qrtool decode 'image.jpg'
  3. Observe empty output You can try redirecting stdout to a file, result is an empty file.

Expected behavior

The output should be a list of links:

https://4f.com.pl/koszulka-polo-meska-biala-4fraw24tptsm573-10s.html
https://4f.com.pl/czapka-dokerka-meska-4faw23acapm315-71s.html
https://4f.com.pl/mezczyzni/odziez/bielizna-termoaktywna.html
https://4f.com.pl/kategorie/pomysl-na-prezent/plec-mezczyzna/rozmiar-sm.html
https://4f.com.pl/kategorie/pomysl-na-prezent/selekcja-premium/plec-mezczyzna-unisex.html
https://4f.com.pl/czapka-z-daszkiem-treningowa-meska-under-armour-m-iso-chil-armourvent-str-bezowa-1383438-263.html
https://duckduckgo.com/?q=iso+chill+vs+heatgear&t=ffab&ia=web
https://www.underarmour.pl/pl-pl/search/unisex/?q=Iso-Chill
https://www.underarmour.pl/pl-pl/c/meskie/
https://www.underarmour.com/en-us/c/technology/iso-chill/
https://www.underarmour.com/en-us/p/hats_and_visors/mens_ua_launch_adjustable_cap/1383477.html?dwvar_1383477_color=100
https://www.underarmour.com/en-us/p/hats_and_visors/mens_ua_armourvent_stretch_fit_cap/1383438.html?dwvar_1383438_color=101
https://www.underarmour.com/en-us/p/shirts_and_tops/mens_ua_iso-chill_verge_polo/1377366.html?dwvar_1377366_color=104
https://www.underarmour.com/en-us/p/shirts_and_tops/mens_ua_iso-chill_edge_polo/1377365.html?dwvar_1377365_color=103
https://www.underarmour.pl/pl-pl/p/koszulki_polo_do_golfa/koszulka_meska_ua_tee_to_green_printed_polo/197777384423.html
https://www.underarmour.pl/pl-pl/p/joggery_i_spodnie_dresowe/joggery_meskie_ua_match_play/1387137.html?dwvar_1387137_color=014&start=204&breadCrumbLast=M%C4%99%C5%BCczy%C5%BAni
https://www.underarmour.pl/pl-pl/p/bluzy/bluza_meska_ua_unstoppable_fleece_grid/1387904.html
https://www.underarmour.com/en-us/p/hats_and_visors/mens_ua_armourvent_stretch_fit_cap/1383438.html?dwvar_1383438_color=101
https://allegro.pl/oferta/czapka-m-iso-chill-armourvent-str-wht-15842938612
https://allegro.pl/oferta/under-armour-czapka-z-daszkiem-isochill-armourvent-str-wht-15441009843
https://allegro.pl/oferta/z-daszkiem-under-armour-iso-chill-driver-mesh-m-l-czapka-meskie-bialy-15495779514
https://allegro.pl/oferta/under-armour-czapka-z-daszkiem-meska-biala-chino-1369785100-51-60cm-16299437719
https://www.ceneo.pl/164705814
https://www.underarmour.com/en-us/c/technology/heatgear/

Examples of websites that can decode this QR code: https://online-barcode-reader.inliteresearch.com/ https://products.aspose.app/barcode/recognize/qr

qrtool version

0.11.7

Rust version

rustc 1.84.0 (but I used Arch Linux's build of qrtool)

Environment

  • OS: Arch Linux
  • CPU architecture: x86_64

Additional context

The QR code was generated using https://libreqr.fosshost.com/ and then a photo of the screen was made.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

johnnynoone avatar Jan 14 '25 01:01 johnnynoone

I'm encountering the same bug with a QR code generated from Edge's context menu "Create QR Code for this page"

The QR code

Image

This should decode to https://sorairolake.github.io/qrtool/book/man/man1/qrtool-decode.1.html but the output of qrtool decode image.png is empty. The exit code is 0.

qrtool version

0.11.7

Rust version

stable-x86_64-pc-windows-msvc (default) rustc 1.84.0 (9fc6b4312 2025-01-07)

Environment

  • OS: Windows 11
  • CPU architecture: x86_64

asasine avatar Jan 30 '25 14:01 asasine

@johnnynoone @asasine Does this issue occur with this crate but not with the rqrr crate?

sorairolake avatar Jan 31 '25 07:01 sorairolake

No idea, didn't try rqrr. It looks like a library, not a ready-to-use tool. You could try using it with the image I attached previously.

johnnynoone avatar Feb 01 '25 23:02 johnnynoone

I've created a gist with a repro using the rqrr crate directly.

For @johnnynoone's image (1.jpg), the result of rqrr::PreparedImage::detect_grids is an empty vector.

For my image (2.png), decoding the first grid results in a rqrr::DeQRError::DataEcc error from rqrr::Grid::decode.

Clone https://gist.github.com/asasine/24e615f96d89664ab59a43ac7de84f31 and cargo run to reproduce. Same environment as above.

asasine avatar Feb 06 '25 15:02 asasine

@asasine Thanks.

I think this issue should be fixed, but it's difficult for me to fix it. If someone fixes this in this crate, I'll accept it. Alternatively, it may be resolved by fixing the rqrr crate.

sorairolake avatar Feb 13 '25 11:02 sorairolake