I'm just investigating using Aspose.Slides in our application to produce PPT files and have downloaded the demo programs and started using it. I've hit a problem that I hope someone has already dealt with...
We create custom images in our Java application using code like that below:
BufferedImage im= new BufferedImage(sizeX , sizeY, BufferedImage.TYPE_INT_ARGB);
Graphics2D temp = im.createGraphics();
paint(temp); // paints objects and text
I'd like to then use this image to populate a aspose.slides.Picture object, but the only public method is to pass it an InputStream. I don't want to have to write my image out to a temporary file and create an InputStream to get it back.
Are there any plans on implementing a Picture constructor that lets me pass in a java Image class instead?
A problem I'm having with this method is that the portions of the image that I did not paint anything onto are becoming opaque when I write it to a GIF file using ImageIO. When this is then added as a Picture, the background comes out black in the slide - for example, when I'm drawing a circle, the result is a circle inside a black square, rather then a nice circle image with transparent background. I'm sure this is a problem with how I'm writing the image to the GIF file, which I'd like to avoid in the first place anyway - however any alternate solution needs to deal with this transparency problem too. My guess is I have to pick a color I don't plan to use, fill the image background with it, then declare that color to be tranparent to Aspose software - just haven't tried that yet.
Thanks in advance for any ideas you have.
This message was posted using Page2Forum from Technical Articles - Aspose.Slides for .NET and Java