This is not a bug, I might not use the library properly.
Like a lot of people, I had the bad surprise to see that System.drawing is not supported by .net6 (except if you are running on Windows server).
To keep the QrCode feature, I decided to go for ZXing and ImageSharp libraries and I tried to add barcodereader-imagesharp library.
I figure out how to create a QrCode but I have been struggling for a long time on the reading of the QrCode.
Starting from formFile which is a IFormFile
var image = Image.Load(formFile.OpenReadStream());
var barcodeReader = new BarcodeReader.ImageSharp.BarcodeReader(true, BarcodeFormat.QR_CODE);
var result = await barcodeReader.DecodeAsync(image);
var str = result.ToString();
Can you please highlight what is wrong in my code?
Would it be better to work byte array of the image?
This is not a bug, I might not use the library properly.
Like a lot of people, I had the bad surprise to see that System.drawing is not supported by .net6 (except if you are running on Windows server). To keep the QrCode feature, I decided to go for ZXing and ImageSharp libraries and I tried to add barcodereader-imagesharp library. I figure out how to create a QrCode but I have been struggling for a long time on the reading of the QrCode.
Starting from formFile which is a IFormFile
var image = Image.Load(formFile.OpenReadStream());
var barcodeReader = new BarcodeReader.ImageSharp.BarcodeReader(true, BarcodeFormat.QR_CODE);
var result = await barcodeReader.DecodeAsync(image);
var str = result.ToString();
Can you please highlight what is wrong in my code? Would it be better to work byte array of the image?
Any help would be appreciated. Thanks. Sebastien