We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Inconsistent handling of gif images between .docx and .doc files

Hey,


I am attempting to parse two word documents that I have attached. One is in .doc format and the other is in the .docx format. My goal is to convert the gif formatted image to a png formatted image.

In the .doc file, it appears that the image gets identified by the ImageType.PNG type. However, in the .docx file, it is coming through as ImageType.UNKNOWN. Unfortunately, this prevents me from correctly identifying the image type and saving it as a .png.

According to this post, .gif images should be converted to .png images at load time. Is this not happening in .docx documents correctly?

I have reproduced this on version 11.7.0 and 13.3.0.1. I arrive at this issue as follows:
  1. visitShapeStart(Shape shape) is called
  2. com.aspose.words.ImageData data = shape.getImageData();
  3. ImageType.UNKNOWN == data.getImageType();

Expected Result:
data.getImageType() == ImageType.PNG in .doc and .docx files for .gif images.


Any help on this matter would be greatly appreciated!

Thanks,

Hi there,


Thanks for your inquiry. I have managed to reproduce the same issue at my side (DrawingML.ImageData.ImageType return unknown for gif images). I have logged this issue as WORDSNET-8150 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-8150) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.