BarcodeEngine engine = new BarcodeEngine();
BarcodeSymbology symbology = (BarcodeSymbology)Enum.Parse(typeof(BarcodeSymbology), barcodeType);
BarcodeData data = new BarcodeData(symbology, barcodeValue);
data.Bounds = new LogicalRectangle(intersect.Left, intersect.Top, intersect.Width, intersect.Height, LogicalUnit.Pixel);
RasterImage rasterImage = imgViewer.Image.Clone();
engine.Writer.WriteBarcode(rasterImage, data, null);
写条码可以成功,但是如果BarcodeSymbology 是QR时即二维码时,就会报错,报错如下
,版主帮忙看下,这个是怎么回事
|