コード例 #1
0
 public MagickBarcodeEncoder(BarcodeFormatEnum barcodeFormat)
 {
     _writer = new MagickBarcodeWriter()
     {
         Format  = (BarcodeFormat)barcodeFormat,
         Options = new EncodingOptions
         {
             Width       = 512,
             Height      = 512,
             Margin      = 1,
             PureBarcode = true
         },
         Renderer = new MagickImageRenderer()
     };
 }
コード例 #2
0
 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
         }
     };
 }