Bug in Aspose.Slides for Java - Incorrect Image Export (Gradient Color)

Dear Aspose Support Team,

We have encountered a bug in the Aspose.Slides for Java library, specifically related to incorrect image export including a gradient background. Below are the details of the issue, along with the necessary information for your review:

Reproduction Steps:

  1. Example presentation with a gradient background: ColorExportBugExample.zip (66.8 KB)

  2. Code triggering the bug:

public void bugReproduction() throws FileNotFoundException {
	Presentation presentation = new Presentation(
			new FileInputStream(
					new File("/path/to/ColorExportBugExample.pptx")));

	for (var slide : presentation.getSlides()) {
			try (FileOutputStream fos = new FileOutputStream(
				"/temp/slides/jpg/" + (presentation.getSlides().indexOf(slide) + 1)
						+ ".jpg")) {
			var img = slide.getImage(2, 1);
			img.save(fos, ImageFormat.Jpeg);
		}
	}
}

Issue Description:

  • Expected Appearance: Export all Slides from the Example Presentation in PowerPoint (Slide 1:
    slide1-pptx.jpg (99.1 KB)

  • Aspose Exported Slide 1: Execute the code from the Reproduction Section (Slide 1:
    slide1-aspose.jpg (92.9 KB)

Observations:

  • Slide 2 of the Aspose-Exported images is displayed correctly, all other slides seem like to have a opacity filter on the background color, which is not visible in the Powerpoint-Exported images
  • we are using the newer Modern API to export the images that were announced in version 24.4

Environment:

  • Aspose.Slides version: 24.4
  • Java version: 17
  • Operating Systems: Ubuntu 22.04 & macOS 14.4.1 & Windows 11

@justinvo,
Thank you for reporting on the issue. I’ve reproduced the problem you described. We apologize for any inconvenience caused.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESJAVA-39467

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Please also note that you can write

slide.getSlideNumber()

instead of

presentation.getSlides().indexOf(slide) + 1
1 Like

The issues you found earlier (filed as SLIDESJAVA-39467) have been fixed in Aspose.Slides for Java 24.8 (JAR).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.