PptxReadException "Found Inconsistency in Image Data. The Image Data Contained Has Incorrect Pixels Count." When Loading a PPTX File in Java

Hi,

We are using Aspose.Slides for Java (version 26.4, classifier jdk16) in a batch process that converts PPTX files to PDF. For one specific customer file, loading the presentation fails with the following exception:

class com.aspose.slides.PptxReadException: Found inconsistency in image data. The image data contained has incorrect pixels count. —> class com.aspose.slides.internal.v7i.i6: Found inconsistency in image data. The image data contained has incorrect pixels count.
com.aspose.slides.internal.v8r.c2$c2.i6(Unknown Source)
com.aspose.slides.internal.s4x.i2.i6(Unknown Source)
com.aspose.slides.internal.s4x.i2.i6(Unknown Source)
com.aspose.slides.internal.s4x.i2.i6(Unknown Source)
com.aspose.slides.internal.v8r.c2.i6(Unknown Source)
com.aspose.slides.internal.v8r.c2.i6(Unknown Source)
com.aspose.slides.internal.s4x.q6$c2.i6(Unknown Source)
com.aspose.slides.internal.s4x.i2.i6(Unknown Source)
com.aspose.slides.internal.s4x.i2.i6(Unknown Source)
com.aspose.slides.internal.s4x.i2.i6(Unknown Source)
com.aspose.slides.internal.s4x.q6.c2(Unknown Source)
com.aspose.slides.internal.s4x.q6.i6(Unknown Source)
com.aspose.slides.internal.s4x.q6.i6(Unknown Source)
com.aspose.slides.internal.s4x.q6.c2(Unknown Source)
com.aspose.slides.internal.s4x.q6.e2(Unknown Source)
com.aspose.slides.internal.f6d.i6.i6(Unknown Source)
com.aspose.slides.internal.f6d.c2.read(Unknown Source)
java.desktop/javax.imageio.ImageReader.read(Unknown Source)
com.aspose.slides.internal.b9r.i6.i6(Unknown Source)
com.aspose.slides.internal.b9r.i6.q1(Unknown Source)
com.aspose.slides.internal.l1b.p4.i6(Unknown Source)
com.aspose.slides.internal.l1b.p4.(Unknown Source)
com.aspose.slides.internal.l1b.p4.(Unknown Source)
com.aspose.slides.internal.l1b.i2.i6(Unknown Source)
com.aspose.slides.internal.l1b.i2.i6(Unknown Source)
com.aspose.slides.internal.l1b.i2.i6(Unknown Source)
com.aspose.slides.internal.q1z.m9.f4(Unknown Source)
com.aspose.slides.PictureFrame.i1(Unknown Source)
com.aspose.slides.j0r.i6(Unknown Source)
com.aspose.slides.j9b.i6(Unknown Source)
com.aspose.slides.j9b.i6(Unknown Source)
com.aspose.slides.h0.i6(Unknown Source)
com.aspose.slides.t6i.i6(Unknown Source)
com.aspose.slides.h7h.i6(Unknown Source)
com.aspose.slides.r6r.k2(Unknown Source)
com.aspose.slides.r6r.i6(Unknown Source)
com.aspose.slides.Presentation.p4(Unknown Source)
com.aspose.slides.Presentation.i6(Unknown Source)
com.aspose.slides.Presentation.i6(Unknown Source)
com.aspose.slides.Presentation.(Unknown Source)

The exception is thrown directly from the Presentation constructor:

presentation = new Presentation(inputFilePath.toString(), loadOptions);

We are not passing any special LoadOptions other than font mapping related settings.

Unfortunately, we are not able to share the source PPTX file itself, since it contains a customer’s confidential/private data and we are not permitted to upload it externally for security reasons.

Our main questions are:

  1. Is this a known issue with a specific class of malformed/corrupted image data (e.g. a JPEG with an incorrect pixel count in its header) that Aspose.Slides is unable to tolerate?

  2. Is there any LoadOptions setting, or any other supported API (e.g. IResourceLoadingCallback), that would let us skip or tolerate this specific embedded image failure during Presentation loading, rather than the whole file failing to load?

  3. Has this been fixed or improved in a newer version of Aspose.Slides for Java after 26.4?

Thanks in advance for any guidance.

@nisd,
Thank you for the detailed information.

Aspose.Slides for Java 26.7 is currently available. Could you please test the presentation with this version and let us know whether the exception still occurs?

The exception indicates that the presentation contains inconsistent or malformed image data. However, without a reproducible file, we cannot determine the exact cause, identify the affected image format, or confirm whether the same problem has already been fixed.

IResourceLoadingCallback is intended for managing external resources and cannot be used to skip a malformed image embedded in a PPTX file. There is currently no LoadOptions setting that allows Aspose.Slides to ignore such an image and continue loading the presentation.

We understand that you cannot share the original presentation. Could you please create a sanitized or minimal version that preserves the problematic image while removing confidential content? Alternatively, you could extract and share the affected image from the ppt/media directory of the PPTX package.

Once we have reproducible input, we will investigate the issue further and register it in our issue-tracking system if necessary.

@andrey.potapov
Thank you very much for the detailed and prompt response, and for clarifying the behavior of IResourceLoadingCallback and LoadOptions.

Understood that this is not a currently known/tracked issue, and that a reproducible file is required for further investigation on your side.

For now, we will treat this file as unconvertible on our end and will not need further investigation at this time. If we encounter this issue again or it becomes a recurring problem, we will prepare a sanitized/minimal reproduction (or extract the affected image from ppt/media) and reach out again on this thread with the reproducible file.

Thank you again for your help.

@nisd,
You’re welcome, and thank you for the update.

If you encounter this issue again, please share a sanitized presentation or the affected image, and we will investigate it further.