VintaSoft Barcode .NET SDK v10.0
In This Topic
    Get barcode image as System.Drawing.Bitmap object
    In This Topic

    Example: Here is an example that shows how to get barcode as Bitmap object and save the bitmap to a file.

    ' create the barcode writer
    Dim barcodeWriter As New BarcodeWriter()
    
    ' set barcode writer settings
    barcodeWriter.Settings.Barcode = BarcodeType.Code128
    barcodeWriter.Settings.Value = "012345abcde"
    
    ' get a barcode image
    Dim image As Image = barcodeWriter.GetBarcodeAsBitmap()
    
    ' save the barcode image to a file
    image.Save("imageWihBarcode.png")
                  
    
    // create the barcode writer
    BarcodeWriter barcodeWriter = new BarcodeWriter();
    
    // set barcode writer settings
    barcodeWriter.Settings.Barcode = BarcodeType.Code128;
    barcodeWriter.Settings.Value = "012345abcde";
    
    // get a barcode image
    Image image = barcodeWriter.GetBarcodeAsBitmap();
    
    // save the barcode image to a file
    image.Save("imageWihBarcode.png");