Aspose.Slides for .Net image extraction

I’ve been trying to extra images from a PPTX presentation. I can’t get the sample code at Extracting Images from Presentation shapes|Aspose.Slides Documentation to work, firstly the Presentation Class determines my pptx file is a zip file, so I’ve been trying to use the PresentationEx class, however the sample refers to classes in the Aspose.Slides.PPT namespace which can’t be used with the PresentationEx class. I’ve done my best to figure out the equivalent classes in the Aspose.Slides.PPTX namespace, but no images are identified. How do I get it to work?

I have managed to extract the image data using the PresentationEx.Images array however I can’t determine what slide number they came from by this method. Is there any way I can do so?

Regards,

Tom

Hi Tom,

I have observed the requirements and issues shared by you. From your comments, it seems that you are using Aspose.Slides for .NET 8.x.x series assembly of Aspose.Slides for .NET. The said series is legacy Aspose.Slides for .NET that has different namespaces for PPT and PPTX presentations. The documentation link that you have referred is in accordance to new unified Aspose.Slides for .NET 14.1.0, that provides the single namespace for both PPT and PPTX. We have maintained the offline PDF documentation for legacy Aspose.Slides for .NET 8.x.x series. Please open the PDF and proceed to page 619 of the document. You will find the sample article for extracting the images from slide shapes. In article, we have extracted the images by traversing through independent slides and thier respective shapes for images. You can refer to specified information and I am hopeful, it will prove helpful to you. Please share if I may help you further in this regard.

PS: If you try accessing PPTX using Presentation class, you will get exception as this is not supported in Aspose.Slides for .NET legacy 8.x.x series API.

Many Thanks,

Hi,

We are using the latest version from the most recent Aspose.Total release. This seems to be different than the Aspose.Slides individual release, why is this?

Regards,

Tom

Hi,

I’ve also tried the latest version (14.1.0.0) and still can’t get the sample code to identify any images in my test pptx file. What types of image data should I be able to extract?

Thanks,

Tom

Hi Tom,

I like to share that Aspose.Total installer include all Aspose products latest assemblies that are available on date on which you have downloaded the Aspose.Total package. Unfortunately, it is not possible to tell that which version of Aspose.Slides is included in your Aspose.Slides total package.

Please proceed to Aspose.Slides assembly that you are using on your end. Right click over that. In details you will find the version of Aspose.Slides for .NET dll version as given in attached info.png .

If you find Aspose.Slides for .NET version to be 13.12.0 or greater then you may please need to consult, Extracting Images from Presentation shapes. In case, you are using Aspose.Slides for .NET 8.3.0 or lesser version on your end, then you may please consult the article available on page 619 of the offline PDF documentation (http://www.aspose.com/community/files/51/.net-components/aspose.slides-for-.net/entry521316.aspx) for legacy Aspose.Slides for .NET API.

Still, if there is any issue the please share the sample presentation and Aspose.Slides for .NET version number with us. I will generate a sample application for your convenience to help you further.

Many Thanks,

Hi,



I’ve tested this with the latest Aspose.Slides 14.1.0.0 and I still can’t get the code sample to work. I’ve attached my sample project and example PPT file. No images are extracted from the PPTX, despite a variety being present in the file.

Regards,

Tom

Hi Tom,


Thanks for sharing the sample project with us. I have worked with the project and have made some changes in that and it is now extracting images from slide shapes. Actually, for your presentation, the slide shapes with images are returning the FillType as NotDefined instead of Picture. This seem to be an issue and we need to check it further on our end. For this an issue with ID SLIDESNET-35003 has been created in our issue tracking system to further investigate and resolve the issue.

For the time being, I suggest you to please try using the attached sample project on your end to serve the purpose. Please share, if I may help you further in this regard.

Many Thanks,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.