public MagickBarcodeEncoder(BarcodeFormatEnum barcodeFormat) { _writer = new MagickBarcodeWriter() { Format = (BarcodeFormat)barcodeFormat, Options = new EncodingOptions { Width = 512, Height = 512, Margin = 1, PureBarcode = true }, Renderer = new MagickImageRenderer() }; }
public MagickBarcodeDecoder(BarcodeFormatEnum barcodeFormat) { _methods = new Func <IMagickImage, Result>[] { AutoThresholdUndefined, AutoThresholdKapur, AutoThresholdOTSU, AutoThresholdTriangle, Quantize }; _reader = new MagickBarcodeReader { Options = new DecodingOptions { PossibleFormats = new BarcodeFormat[] { (BarcodeFormat)barcodeFormat }, TryHarder = true } }; }