Open davebarribeau opened 4 months ago
Hi @davebarribeau I think that this repo is died. Can you apply the fix and create a Pull Request?
I think that the naming could be confusing.
If you take a look at the specifications page 10, it talks about a 10x10 symbol size
for a 8x8 data region
So DmtxSymbolSize10x10
is named correctly on first position and there should not be any DmtxSymbolSize8x8
As I am migrating the code to a full working dotnet core
, I am starting to check more deeply the data matrix specs and try to find/resolve any issues.
I will check your image generation error 👍
Thanks for your report.
The issues are in the DmtxConstants.cs file The smallest size DataMatrix is 8x8, which is omitted in the DmtxSymbolSize enum. While this is OK, the other int arrays of SymbolDataWords, SymbolRows, SymbolCols, DataRegionRows, and DataRegionCols include the entries for this 8x8 size. It causes a larger matrix size to be selected than what it is needed, and contributes to an image generation error. For example, encode text "12345678000001" with a module size=3 and margin=0. So either add DmtxSymbol8x8=0, to the DmtxSymbolSize enum, or else remove the incorrect int[0] elsements from the other int arrays. I don't know if the design was intended to not include the 8x8 symbol size.