Skip to content

Reading QR Code data with ImageMagick library (https: github.com dlemstra Magick.NET)

Michael Jahn edited this page Feb 3, 2020 · 1 revision

(easiest example to start with)

Then all you have to do:

var reader = new BarcodeReader();
reader.Options.PossibleFormats = new List<BarcodeFormat> {
  BarcodeFormat.QR_CODE
};
using (var image = new MagickImage(filepath)) {
  var result = reader.Decode(image);
  if (result != null) {
    return result.Text;
  }
}
return null;