We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bar Code is reading for Reverse image

Hi all

I don’t want to read reverse image bar code. i tried for this code

        BarCodeReader reader = new BarCodeReader(@"D:\test\Reverse_barcode.jpg", DecodeType.Code39Standard);
        reader.RecognitionMode = RecognitionMode.ManualHints;
        reader.ManualHints = ManualHint.SkipRotatedBarcodes;
        try
        {
            while (reader.Read())
            {
                Console.WriteLine("BarCode Type: " + reader.GetCodeType());
                Console.WriteLine("BarCode CodeText: " + reader.GetCodeText());
                Console.ReadLine();

            }
        }
        catch (Exception ex)
        {
            throw new Exception("unable to read barcode" + ex.Message);

        }

But this one is not working for me.please guide me.

please check image in the attachment.Reverse_barcode.jpg (56.1 KB)

@vikasagrawal,

Thank you for details. We have investigated the issue at our end. Initial investigation shows that the property Aspose.BarCode.BarCodeRecognition.ManualHint.SkipRotatedBarcodes is not working properly for which the issue has been logged into our system with ID BARCODENET-36929. We will look into in detail and will update you once there is some update or a fix is available.

In the mean while you may use BarCodeReader.GetAngle() method to detect rotated barcodes. Following code snippet is an example of how we can use this method.

CODE:

int threshold = 5;
if( Math.Abs(180 - reader.GetAngle()) < threshold)
{
     //this is reversed barcode
}