Free Support Forum -

Unable to read QR Code from Image

Hi there. I'm having an issue with scanning a QR code with Aspose for .NET. I can upload the attached file to the following URL and it reads perfectly every time:

However, I cannot get this same file to read in my application code. I've tried using the advanced settings such as orientation and hints but none seem to make a difference. I'm puzzled because the Aspose site can read any of the QR images I upload to it but I can't seem to make it work. Here's the code I'm using:


BarCodeReader reader = new BarCodeReader(s, BarCodeReadType.QR);
string codeText = null;
reader.ExpectedBarCodeCount = 1;
reader.OrientationHints = RecognitionHints.Orientation.Rotate180;
reader.ImageBinarizationHints = RecognitionHints.ImageBinarization.MedianSmoothing;

while (reader.Read())
codeText = reader.GetCodeText();


"s" represents the local path to the file and I've verified that it's corret. .Read() returns false every time. I've yet to get it to work.

Also, my DLL says that it's version in case you wondering. I'd appreciate any assistance you could give me.

Thank you,


Hi Sam,

Thank you for sharing the sample document.

I have tested your provided sample against the latest build of Aspose.BarCode for .NET v5.0.0. I regretfully inform you that the latest version was unable to recognize barcode from your sample. This problem has been logged in our bug tracking system under ticket Id BARCODENET-33334. We will soon investigate the cause of recognition failure and share our results here. Also, you will be notified once the fix for your problem is available for public use.

Please accept our apologies for your inconvenience.

I'm confused though. Your website's file uploader can read this same file every time without fail. Also, your web page here...

... is for .NET but if you look at this line:

BarCodeReadType readType = BarCodeReadType.Empty;

... the "Empty" enumeration isn't even available in your downloadable API. It seems like we're working from two different version then, but as far as I know, I have the latest one. You say that the latest version is unable to recognize the barcode but clearly one exists that can recognize it (per the website).

What's the difference between the website recognition page, the example code and the latest available version from your site for .NET?


Hi Sam,

Thanks for your details. It's to update you that the version in live demos is older. I would like to share with you that we publish new versions of all the components usually on monthly basis. All fixes and new features are always added into new versions of our products. But the reason, we’re also restructuring some of the code to make it more efficient.

In case of further assistance or comments, please let me know.

The issues you have found earlier (filed as BARCODENET-33334) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.