I have a TIFF document with two barcodes (one QR and one 3 of 9). The QR reads consistently regardless of orientation, but the 3 of 9 fails consistently on all of my samples. Following is my code:
using (BarCodeReader reader = new BarCodeReader(textBoxPath.Text, BarCodeReadType.AllSupportedTypes))
{
reader.ImageBinarizationHints = RecognitionHints.ImageBinarization.MedianSmoothing;
textBoxResults.AppendText(“Creating barcode reader object with image file” + Environment.NewLine);
while (reader.Read())
{
textBoxResults.AppendText(“Reading barcode” + Environment.NewLine);
textBoxResults.AppendText("\tType: " + reader.GetReadType() + Environment.NewLine);
textBoxResults.AppendText("\tValue: " + reader.GetCodeText() + Environment.NewLine);
}
reader.Close();
textBoxResults.AppendText(“Barcode reader closed” + Environment.NewLine);
}
Attached are two test samples. I’m using the latest version of Aspose.BarCode, downloaded yesterday.