QR Code render thows an exception
tinohager opened this issue · comments
I installed these two packages as described in the documentation, the error thows in my netcoreapp3.1
- Barcoder
- Barcoder.Renderer.Image
var barcode = QrEncoder.Encode(qrcode.Content, Barcoder.Qr.ErrorCorrectionLevel.M, Encoding.Auto);
var renderer = new ImageRenderer(imageFormat: Barcoder.Renderer.Image.ImageFormat.Png);
using (var ms = new MemoryStream())
{
renderer.Render(barcode, ms);
var imageData = ms.ToArray();
this._skCanvas.DrawBitmap(SKBitmap.Decode(imageData), x, y);
}
This library is still depending on a beta version of the SixLabors.ImageSharp package. I think we should update it to a non-beta release if that's possible before trying anything else.
Apart from that, I think this error can happen when your project also references the same NuGet package, but a different version.