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 Apr 21, 2023 4:05 am

I'm using spire office v8.2.0 for .net (c#) win10 64bit

This is what image looks like in the powerpoint document:
Image
This is what the image looks like after I export it using
Code: Select all
Spire.Presentation.SlidePicture.SaveAsImage().Save("path");

Image
from the same document.

Other images are blurry too, but not all of them. There are several images on the slide and I need to export them individually and automatically.

How do I access the version that is not blurred?

joekatana
 
Posts: 6
Joined: Thu Apr 20, 2023 7:41 am

Fri Apr 21, 2023 10:03 am

Hi,

The SlidePicture.SaveAsImage() method you are using is intended to save the picture shape in the slide as an image, rather than extract the original picture resource and save it to a file.

Are you trying to extract the original picture resource and save it to a file? If so, please use the following code:

Code: Select all
if (shape is SlidePicture)
                {
                    SlidePicture ps = shape as SlidePicture;
                    ps.PictureFill.Picture.EmbedImage.Image.Save("test.png");
         }


If you have any questions, please feel free to contact us.

Sincerely,
Ella
E-iceblue support team
User avatar

Ella.Zhang
 
Posts: 42
Joined: Fri Apr 07, 2023 7:42 am

Fri Apr 21, 2023 2:56 pm

That worked.

EDIT: I'm turning the other question into another post

joekatana
 
Posts: 6
Joined: Thu Apr 20, 2023 7:41 am

Sun Apr 23, 2023 1:29 am

Hi,

Thank you for your feedback and I am glad to help you.

Your other problem is being handled. I'll get back to you as soon as I know.

Sincerely,
Ella
E-iceblue support team
User avatar

Ella.Zhang
 
Posts: 42
Joined: Fri Apr 07, 2023 7:42 am

Return to Spire.Presentation

cron