Create barcode with transparent background.

Code samples for VintaSoft Barcode .NET SDK. Here you can request a code sample.

Moderator: Alex

Post Reply
Site Admin
Posts: 2059
Joined: Thu Jul 10, 2008 2:21 pm

Create barcode with transparent background.

Post by Alex »

Transparent colors are supported in RGBA images, i.e. in 32- and 64-bit images.

Here is an example that shows how to create barcode with transparent background:

Code: Select all

public static System.Drawing.Bitmap GenerateBarcodeWithTransparentBackground(Vintasoft.Barcode.BarcodeType type, string value)
    Vintasoft.Barcode.BarcodeWriter writer = new Vintasoft.Barcode.BarcodeWriter();
    writer.Settings.Barcode = type;
    writer.Settings.Value = value;
    writer.Settings.PixelFormat = Vintasoft.Barcode.BarcodeImagePixelFormat.Bgra32;
    writer.Settings.BackColor = System.Drawing.Color.Transparent;
    return writer.GetBarcodeAsBitmap();
Post Reply