VintaSoft Barcode .NET SDK Discussions
Questions, comments and suggestions concerning VintaSoft Barcode .NET SDK.
Board index < VintaSoft Barcode < VintaSoft Barcode .NET SDK Discussions
m_reader.Settings.ScanDirection = Vintasoft.Barcode.ScanDirection.Angle45and135 | Vintasoft.Barcode.ScanDirection.BottomToTop | Vintasoft.Barcode.ScanDirection.LeftToRight | Vintasoft.Barcode.ScanDirection.RightToLeft | Vintasoft.Barcode.ScanDirection.TopToBottom; m_reader.Settings.SearchDistortedDataMatrixBarcodes = true;What else would I need to do to allow us to read barcodes using your software that have been scanned/faxed in? Using the same faxed images and barcode reading software on our mobile phones, we are able to read it without any problems so we know it still can be read.
static void DownscaleRead(string filename, int k)
{
// create image
Image image = Image.FromFile(filename);
// create downscale image
Image newImage = new Bitmap(image.Width / k, image.Height / k, PixelFormat.Format32bppPArgb);
using (Graphics g = Graphics.FromImage(newImage))
{
// using image smoothing
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
// draw downscale image
g.DrawImage(image, 0, 0, newImage.Width, newImage.Height);
}
// free image
image.Dispose();
// create reader
BarcodeReader reader = new BarcodeReader();
reader.Settings.ScanBarcodeTypes = BarcodeType.DataMatrix;
// read barcode
Console.WriteLine((reader.ReadBarcodes(newImage)[0]).Value);
// free dowscale image
newImage.Dispose();
}
For such barcodes we recommend to scale image down 4 times: