Transparent Background Problem

Hi,


I was working with aspose.barcode and i found a bug-or i made mistake with parameters. When you try to make barcode with transparent background, barcode dont give correct result.

Here is my code
BarCodeBuilder builder = new BarCodeBuilder();
builder.GraphicsUnit = GraphicsUnit.Pixel;
builder.SymbologyType = Symbology.QR;
builder.CodeText = “1”;
builder.CodeLocation = CodeLocation.None;
builder.AutoSize = false;
builder.BarHeight = 250;
builder.ImageQuality = ImageQualityMode.Default;
builder.CaptionAbove.Visible = false;
builder.CaptionBelow.Visible = false;
builder.BackColor = Color.Transparent;
builder.QRErrorLevel = eBABarcodeGenerator.QRErrorLevel.LevelH;
builder.QREncodeMode = eBABarcodeGenerator.QREncodeMode.Auto;
Bitmap code = builder.GetCustomSizeBarCodeImage(new Size(250, 250), false);
code.Save(@“c:\e39.png”, System.Drawing.Imaging.ImageFormat.Png);
return code;
If I use like this result is like 1.png. 
If I change the BackgroundColor = Color.FromArgb(254, Color.White) result is like 2.png
If I change the BacgroundColor = Color.White-Or Color.FromArgb(255, anyColor)- result is like 3.png
But I want to create a barcode like 3.png but transparent. What can i do?

Hi Ahmet,


Thank you for contacting support. Please set the AutoSize property as true. It’s a default value and set barcode’s size automatically. Please also keep the background color as transparent. These steps will help you to generate 3.png like transparent barcode image. I have tested your sample code against the latest build of Aspose.BarCode 6.9.0. The resultant barcode image is attached to this reply.

We hope, this helps. Please feel free to reply us in case of any confusion or questions.

I changed AutoSize property to true and it worked. Thank you.

Hi Ahmet,

Thank you for updating us. It is nice to hear from you that it works perfect on your side. Please feel free to reply us if you have any other query regarding Aspose APIs, we will be happy to help you.