This processor adds a Barcode overlay to the current image.
Supported Barcode symbology:
|
|
|
Method Declaration |
Copy Code |
---|---|
public static ImageFactory BarcodeOverlay(this ImageFactory imageFactory, BarcodeOverlaySettings settings) |
Data | The string text data to be encoded. |
BarcodeType | Barcode's symbology (Devesprit.ImageProcessor.Barcode.BarcodeType). |
Position | The Nullable<System.Drawing.Point> determining the position within the current image to render the overlay. If not set then the overlay will be centered. |
BarWidth | An increase in BarWidth will increase the whole barcode image width. |
BarHeight | Height In 1D barcode, BarHeight determines BarCode's height. |
ShowCode | The code text visibility. |
Opacity | The Opacity of the Barcode overlay (0-100). |
BackgroundColor | Background color of the Barcode overlay (System.Drawing.Color). |
ForegroundColor | Foreground color of the Barcode overlay, that is, Bar's color of 1D barcode, Module's color of 2D barcode (System.Drawing.Color). |
CaptionAbove | Caption Above the Barcode image. |
CaptionBelow | Caption Below the Barcode image. |
RotationAngle | The Barcode overlay rotation angle, measured in degree. |
Margins | Margin area around the core Barcode overlay (System.Drawing.Printing.Margins). |
FontSize | The Barcode text font size (pixel). |
FontStyle | The Barcode text style. |
FontFamily | The Barcode text font family. |
Devesprit.ImageProcessor.Barcode.dll
Original
Example |
Copy Code |
---|---|
new ImageFactory().Load(@"My-Image-Path") .BarcodeOverlay(new BarcodeOverlaySettings() { Data = "Devesprit", Position = new Point(1000, 0), BarWidth = 4, Margins = new Margins(10, 10, 10, 10), BackgroundColor = Color.Transparent, ForegroundColor = Color.White, ShowCode = true }); |
Result
Example |
Copy Code |
---|---|
new ImageFactory().Load(@"My-Image-Path") .BarcodeOverlay(new BarcodeOverlaySettings() { Data = "Devesprit", BarcodeType = BarcodeType.Code128, BarWidth = 1, BarHeight = 40, ShowCode = true }); |
Result