Open murongqingsi opened 1 year ago
var barcodeFormatType = (BarcodeFormat)Enum.Parse(typeof(BarcodeFormat), barcodeFormat); var writer = new ZXing.ImageSharp.BarcodeWriter<Rgba32>(); writer.Format = barcodeFormatType; var Options = new QrCodeEncodingOptions { //DisableECI = true, CharacterSet = "UTF-8", Width = width, Height = height, Margin = 2, PureBarcode=false, }; writer.Options = Options; var image = writer.Write(value); image.Save(pathUrl);
That's right. The renderer based on ImageSharp doesn't support it. Perhaps you or someone else can provide a pull request which adds the functionality.
var barcodeFormatType = (BarcodeFormat)Enum.Parse(typeof(BarcodeFormat), barcodeFormat); var writer = new ZXing.ImageSharp.BarcodeWriter<Rgba32>(); writer.Format = barcodeFormatType; var Options = new QrCodeEncodingOptions { //DisableECI = true, CharacterSet = "UTF-8", Width = width, Height = height, Margin = 2, PureBarcode=false, }; writer.Options = Options; var image = writer.Write(value); image.Save(pathUrl);