Devesprit.ImageProcessor & Devesprit.ImageServer
BarcodeOverlay

Description:

This processor adds a Barcode overlay to the current image.

Supported Barcode symbology:

  • Codabar
  • Code11
  • Code39Standard
  • Code39Extended
  • Code93Standard
  • Code93Extended
  • Code128
  • EAN8
  • EAN13
  • EAN14
  • SCC14
  • SSCC18
  • UPCA
  • UPCE
  • ISBN
  • ISSN
  • ISMN
  • Standard2of5
  • Interleaved2of5
  • Matrix2of5
  • ItalianPost25
  • IATA2of5
  • ITF14
  • ITF6
  • MSI
  • VIN
  • DeutschePostIdentcode
  • DeutschePostLeitcode
  • OPC
  • PZN
  • Code16K
  • Pharmacode
  • DataMatrix
  • QR
  • Aztec
  • Pdf417
  • MacroPdf417
  • AustraliaPost
  • Postnet
  • Planet
  • OneCode
  • RM4SCC
  • DatabarOmniDirectional
  • DatabarTruncated
  • DatabarLimited
  • DatabarExpanded
  • SingaporePost
  • SwissPostParcel
  • DatabarExpandedStacked
  • DatabarStacked
  • DatabarStackedOmniDirectional
  • MicroPdf417
  • MaxiCode
  • Code32
  • DataLogic2of5
  • DotCode
  • DutchKIX
  • CodablockF

Method Declaration
Copy Code
public static ImageFactory BarcodeOverlay(this ImageFactory imageFactory, BarcodeOverlaySettings settings)

BarcodeOverlaySettings:

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.

Assembly:

Devesprit.ImageProcessor.Barcode.dll

Example:

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