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: 1924
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 Bitmap GenerateBarcodeWithTransparentBackground(BarcodeType type, string value)
    BarcodeWriter writer = new BarcodeWriter();
    writer.Settings.Barcode = type;
    writer.Settings.Value = value;
    writer.Settings.PixelFormat = BarcodeImagePixelFormat.Bgra32;
    writer.Settings.BackColor = Color.Transparent;
    return writer.GetBarcodeAsBitmap();
Post Reply