Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.
Fri Feb 05, 2016 2:26 pm
Is it possible to get all images from one specific slide? Instead of going through presentation.Images, and saving all of them, I need to know where (in which specific Slide) is the Image positioned.
Or, is there a way to check if a Shape is an Image?
Thank you in advance
-
Petros17
-
- Posts: 1
- Joined: Fri Jan 29, 2016 4:53 pm
Mon Feb 08, 2016 3:28 am
Hello,
Thanks for your inquiry. I'm afraid that at present there is no this kind of method, and I have added the feature to our schedule, once it is added, we will let you know ASAP.
Sincerely,
Gary
E-iceblue support team
-
Gary.zhang
-
- Posts: 1380
- Joined: Thu Apr 04, 2013 1:30 am
Tue Apr 05, 2016 8:28 am
Hello,
Glad to inform you that now the feature has been added, you can download the
Spire.Presentation Pack Hotfix Version:2.5.21 and try the following method.
- Code: Select all
foreach(IShape s in ppt.Slide[0].Shapes)
{
if(s is SlidePicture)
{
SlidePicture ps = s as SlidePicture;
ps.PictureFill.Picture.EmbedImage.Image.Save(string.format("{0}.png",i));
i++;
}
if(s is PictureShape)
{
PictureShape ps = s as PictureShape;
ps.EmbedImage.Image.Save(string.format("{0}.png",i));
i++;
}
}
Sincerely,
Gary
E-iceblue support team
-
Gary.zhang
-
- Posts: 1380
- Joined: Thu Apr 04, 2013 1:30 am