Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Decoding fails for specific QR code generated by Powershell Modules.QRCodeGenerator

Open
#483 2 comments 0 reactions 0 assignees View on GitHub

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

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:

QR code

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:

out-002268

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micjahn/ZXing.Net

All issues in micjahn/ZXing.Net

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.