I just downloaded the barcode package to evaluate it for purchase. We are currently using libdmtx and I was running some of the unit tests that resulted in failures with it and have duplicated a couple of the problems in your library (but most passed). These seem particular to rectangular datamatrix barcodes (and probably X12). Changing the matrix size doesn’t affect the results, but the barcode text does. If the problem is similar, I think it had to do something with the string length and encoding boundaries.
If there is a better way to generate rectangular datamatrix barcodes, please let me know. Otherwise, I hope this test helps:
var barcodeContent = "1>35>LAQ>5";
var generator = new BarcodeGenerator(EncodeTypes.DataMatrix, barcodeContent);
generator.Parameters.Barcode.XDimension.Millimeters = 1f;
generator.Parameters.Barcode.DataMatrix.DataMatrixEncodeMode = DataMatrixEncodeMode.ANSIX12;
generator.Parameters.Barcode.DataMatrix.DataMatrixEcc = DataMatrixEccType.Ecc200;
generator.Parameters.Barcode.DataMatrix.Rows = 16;
generator.Parameters.Barcode.DataMatrix.Columns = 48;
// Save the image to your system and set its image format to Jpeg
using (var ms = new MemoryStream())
{
generator.Save(ms, BarCodeImageFormat.Tiff);
using (var reader = new BarCodeReader(ms))
{
var results = reader.ReadBarCodes();
Assert.AreEqual(1, results.Length);
Assert.AreEqual(barcodeContent, results[0].CodeText);
}
}