C# Export Transparent Image

S

Simon Turner

Hello Guys,

Sorry to bother you all, but i have been trying to solve this problem
for a few days now and am really not getting anywhere!

I am exporting images from powerpoint 2002 using c#. I can export all
the images as a BMP no problem. The problem arrises when there is a
transparent image in a presenation.

If i export as a BMP the background goes black, i need a way of
working out weather the images (Shapes) are transparent in code and if
so export then as say PNG instead.

I have looked at lots of the propertys for the shape class and not
found anything that tells me when an image is transparent. The
following dont seem to be of use:

PictureFormat.TransparentBackground
PictureFormat.TransparentBackground

Anyone found a way of identifying a transparent image in powerpoint?

Thanks a lot guys


Simon Turner
 
A

Abhishek

Im tried this too but had no success.
Then i decided to export all the images as PNG
I'll be very pleased to know another alternative

Abhishek
 
S

Steve Rindsberg

PictureFormat.TransparentBackground
Anyone found a way of identifying a transparent image in powerpoint?

PictureFormat.TransparentBackground will tell you whether the pictures' been
made transparent in PowerPoint using its transparency tool but it won't help
identify pictures that have been made transparent externally like GIFs and
images with alpha channels.

And be cautious with .PictureFormat. PowerPoint 2002 heads for the center of
the earth if you query .PictureFormat on a shape that's not a picture or OLE
object. Instant death, not a trappable error as it would be in PPT 97, 2000
and 2003.

You might be able to get the info you want by copying the image to the
clipboard and working with the images there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top