I’d like to set a white background on my XImage before saving it to an OutputStream, how would I go about doing that?
Here is my sample code:
Document doc = new Document(new File(“Images.pdf”));
Page page = this.doc.getPages().get_Item(1);
XImageCollection images = page.getResources().getImages();
OutputStream os = new BufferedOutputStream(new FileOutputStream(“image.png”));
Using this code, it saves the image with a transparent background, but I would like to force a white background.
How would I go about doing this?