Decoding fails for specific QR code generated by Powershell Modules.QRCodeGenerator
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, powershell
- Domain
- cli, developer-experience
Research direction
The report is about a QR code that the CommandLineDecoder fails to read unless --pure_barcode is passed, while phone scanners read it fine. Start from the decoder's QR detection path in the ZXing.Net source and reproduce with the two attached PNGs. Done would mean identifying why the detector misses the finder patterns for this input, which needs real familiarity with the QR detector.
Written by the indexing model from the issue text.
Description
I'm using https://github.com/TobiasPSP/Modules.QRCodeGenerator to generate some QR codes, however I'm finding that some of them (around 0.1%) are not recognized. I generate the code with the following command:
New-QRCodeText -Text "1668" -OutPath "code.png" -Width 14
...which gives the following file:

Scanning it with .\CommandLineDecoder.exe "code.png" gives "No barcode found"
Scaling, different dimensions, added text, crop, --try_harder all makes no difference. https://zxing.org/w/decode.jspx doesn't work either. Most other QR codes generated by same Powershell library are properly recognized. What does work for the above though, is --pure_barcode.
But, it again doesn't work with or without --try_harder (nor with scaling, --pure_barcode, etc) once I try the actual QR data I want to use, which looks like this:

However, scanning either of these off the screen with various different phone apps does work correctly. (including BinaryEye which uses ZXing C++). Other values than "1668" do work correctly, both in the source PNG (PNG with or without --pure_barcode) and in the actual data (without --pure_barcode)
Is this a bug in the library that it generates broken codes, or a problem in ZXing.NET, or I just need more error correction setting?
- Dominant language
- C#
- Stars
- 3.1k
- Forks
- 704
- Avg merge
- 13d 17h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micjahn/ZXing.Net
-
crop() overrides document "0 <= top <= Height"; should be top < Height like left < WidthPossibly taken @hidingmyname claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 Half a day Newbie friendliness 22/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 12/100
All issues in micjahn/ZXing.Net
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug mac アプリ: コード アプリ: チャット 優先: 中 要トリアージ
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
yksr-melt/Meltype#1346 · 2 comments ·
Maintainers usually reply within 1 day
-
Collect corrected translations in the app, with no GitHub account and the least possible frictionOpenlocalization medium ui
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
hexide-io/HexIDE#2819 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100