Exception "ImageSaveException: Image export failed" is thrown when converting embedded image in PPTX file from EMF to PNG using Apose.Imaging .NET

Hi Team,

We are getting an exception using Aspose.Slides 21.1.0 and Aspose.Imaging 21.2.0 for .NET when trying to process an embedded EMF file in a pptx file.
This happens on windows platform.

Please find an example solution attached for reproducing the issue.

Can you investigate the issue and confirm the root cause please.

Thanks and best regards,
Zoltan
SlideShowWithEmfImage.zip (349.3 KB)

@zpopswat
I am unable to access any image in the shared PPTX. It shows 0 images being read from it. Can you please verify the presentation.

I can confirm that I can open the pptx with MS PowerPoint 2016 on Windows and with LiberOffice Impress 6.4.6.2 on Linux and I am able to save the embedded emf image into a standalone emf image on both platforms. So from my point of view this pptx file is valid.

However, if by “I am unable to access any image in the shared PPTX” you actually mean that you are unable to do that by using Aspose APIs, I can confirm that it seems a valid issue that I already reported alongside this issue at

Please note:

  • both tickets refer to the same pptx file
  • in my experience Embedded EMF Image in PPTX File Is Not Detected only happens on Linux platform
  • in my experience on windows platform Aspose is able to access the embedded file but unable to carry out the file type conversion from EMF to PNG

@mudassir.fayyaz Which platform are you trying on?

@zpopswat

I have used MAC OS and Windows 7 on my end. In case you have separate ticket for EMF reading from PPTX. You can share the EMF with us here for which you are getting exception.

Not sure what you mean by sharing EMF with you. It is in the pptx file that is in the solution that is attached to this very ticket

SlideShowWithEmfImage.zip (349.3 KB)

@zpopswat

I meant to say that I am unable to extract the EMF image using provided sample project from a PowerPoint presentation that you have shared. It returns 0 image. Therefore, Aspose.Imaging doesn’t proceed further with saving of image to validate the image save exception.

@mudassir.fayyaz: I have double checked this with one of my team mates.
He took the solution from this ticket, built it on his windows machine and received the same exception.

image (24).png (17.1 KB)

Maybe you should also try it on a different windows machine than yours.

@zpopswat

I agree with your investigation. However, there is no source EMF image extracted on my end from PowerPoint presentation. Therefore, I have requested you to please share the source EMF (not the one in PowerPoint) that I may use to verify and log the issue.

@mudassir.fayyaz

Please find the requested EMF file attached here:

emf_image.zip (242.0 KB)

Sorry for the delay but it took me a while to track down the person who created the file.

@zpopswat

I have tried to open the attached EMF using online tools and the file seems to be corrupt. Even, when I tried to convert it to PNG or JPG online, I get empty file. Can you please verify your file.

credit-card-svg.png (111 Bytes)
credit-card-svg.jpg (1.2 KB)

@mudassir.fayyaz
On my side the emf file seems perfectly fine. On windows platfrom I can open the file with the following applications:

On linux the file utility recognizes the file as EMF and also, I can open the file with LibreOffice Draw application
image.png (7.6 KB)

Can you please speed up the investigation because we are seeing this issue with other EMF files as well, and it’s blocking our development process.

@mudassir.fayyaz
Pls. try this online converter

it works fine with the EMF file

@zpopswat

I have created a ticket with ID IMAGINGNET-4466 in our issue tracking system after reproducing the issue on saving EMF using Aspose.Imaging for .NET 21.4. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

1 Like

The issues you have found earlier (filed as IMAGINGNET-4466) have been fixed in this update.