I am using aspose-cells-220.127.116.11.jar. I am trying to set the chart image background to transparent usingImageOrPrintOptions.setTransparent(true);
But it doensot take effect. Is there any other way to set an image background to transparent.
Thanks & Regards,
Thank you for contacting Aspose support.
Please note, the transparent option is only available for PNG type of images, therefore please set the ImageFormat to PNG before setting the Transparent property to true, and give it a try on your end.
ImageOrPrintOptions options = new ImageOrPrintOptions();
In case the problem persists, please provide us your template spreadsheet as well as your complete code snippet for our review.
Thanks for the quick feedback.
Well the problem still persists.On converting a chart to image, transparency does not take effect.
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
Also setting transparency to true in following scenario gives an invalid image
SheetRender sr = new SheetRender(sheet, imageOrPrintOptions);
Well I am testing this on a very random sample created by me. But still I have attached the same.
We are really sorry for the inconvenience caused to you.
It seems to be a bug in the Aspose.Cells for Java API, reason being, when we tried to convert the spreadsheet to PNG with transparent background while using the latest version of Aspose.Cells for Java 8.1.0, the resultant PNG contains black background. We have logged this problem in our bug tracking system under ticket CELLSJAVA-40852 for thorough investigation. Please spare us little time to properly analyze the problem cause, and to provide a fix at earliest. In the meanwhile, we will keep you posted with updates in this regard.
Thanks for using Aspose.Cells for Java.
We have fixed this issue.
Please download and try this fix: Aspose.Cells for Java v18.104.22.168 and let us know your feedback.