Saving a Barcode Produces a Black Image

< Back
You are here:
Print

Saving a Barcode Produces a Black Image

Saving the barcode image with the .NET Windows Forms Control with Picture.Save creates a completely black image.

Solution(s):

Use Picture.SaveImageAs instead of Picture.Save.

For example, change:
barcode1.Picture.Save(@”..\..\img.jpg”, System.Drawing.Imaging.ImageFormat.Jpeg);
To:
barcode1.SaveImageAs(@”..\..\img.jpg”, System.Drawing.Imaging.ImageFormat.Jpeg);