Aspose.BarCodeRecognition.BarCodeOrientation Removed

I’m upgrading our code to use the latest version of aspose.

In the previous version that we had, we used the following.

But in the new version I cannot find this anymore.
Is this replaced by something else?


Function Aspose.BarCode.BarCodeRecognition.BarCodeReader.GetBarCodeOrientation()
Enum Aspose.BarCodeRecognition.BarCodeOrientation

Upgrading from project version 2012.* to 2016.*
Hi Stephane,

Thank you for your inquiry.

Looks like you are referencing a very old version of Aspose.Barcode. Can you please share your complete code and expected output to further elaborate your requirement?

If you want to align the code text, please check the link Managing BarCode Text Appearance. If you are trying to read the barcode from a rotated image, you can visit Barcode Orientation for more details.

Hi,


I’m reading a barcode from an image.
But what I want to achieve is the opposite as in the link “Barcode Orientation”.

I search for a barcode. And for further processing in my program. I need to know if my image is rotated. So I used to readout the orientation detected by the Aspose toolkit and with that I fill my property “Angle”.

Dim oReader As New Aspose.BarCode.BarCodeRecognition.BarCodeReader(oStream, Aspose.BarCode.BarCodeRecognition.DecodeType.AllSupportedTypes)
While reader.Read
Dim oBarcodeData As New cBarcodeData

Select Case reader.GetBarCodeOrientation()
Case Aspose.BarCodeRecognition.BarCodeOrientation.LeftToRight
oBarcodeData.Angle = 0
Case Aspose.BarCodeRecognition.BarCodeOrientation.RightToLeft
oBarcodeData.Angle = 18000
Case Aspose.BarCodeRecognition.BarCodeOrientation.TopToDown
oBarcodeData.Angle = 9000
Case Aspose.BarCodeRecognition.BarCodeOrientation.DownToTop
oBarcodeData.Angle = 270000
End Select

<…> 'Process data
End While
Hi Stephane,

Thank you for writing us back along with sample code.

BarCodeReader.OrientationHints property is the one that is in place of GetBarCodeOrientation() method.

Furthermore BarCodeReader class exposes a method GetAngle().This method gets the angle value of the barcode i.e. between 0 to 360 degree. One more thing that should be noted that it returns the angle from the image recognized; it does not assign the angle. For assignment of angle rotation, please use the enum RecognitionHints.Orientation.

Hope the above information helps. Feel free to contact us in case of any query or comments.

Thanks, got it working using GetAngle()

Hi Stephane,

Thank you for update. It is good to know that things are new working at your end.