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

unable to read DataMatrix

Open
#459 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp

Research direction

Start with the reader setup in the issue: a DecodingOptions with TryInverted, TryHarder and AssumeGS1, passed to a BarcodeReader with AutoRotate set to true. Reproduce against the three attached DataMatrix images, where the first decodes, the second decodes only after manual inversion and rotation, and the third fails. Comparing how the detector handles the inverted and rotated cases is where the work lies. Done would mean the third image decodes with AutoRotate enabled, which the issue does not yet show a path to.

Written by the indexing model from the issue text.

Description

I'm having hard time decoding a certain DM barcode.

  1. this one is decoded just fine:
    Unknown_Code_img250p0 03

  2. this one is decoded just after I invert and rotate the bitmap manually until i get the code:
    bcr_dtmx_25

  3. but this one is not working:
    Unknown_Code

this is the reader:
var options = new DecodingOptions()
{
TryInverted = true,
TryHarder = true,
AssumeGS1 = true,
PossibleFormats = new List()
{
BarcodeFormat.QR_CODE,
BarcodeFormat.CODE_39,
BarcodeFormat.CODE_93,
BarcodeFormat.CODE_128,
BarcodeFormat.CODABAR,
BarcodeFormat.DATA_MATRIX
}
};

         var reader = new ZXing.BarcodeReader()
        {
            AutoRotate = true,
            Options = options
        };

       zxingResult = reader.Decode(bitmap);

as you can see, the autoRotate=true, but the second barcode is decoded just when I rotate it manualy.

does anyone have an idea what can i do?

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.