Insert new image

As you sayed 29 Oct 2004, in the post “Inserting image to Presentation File”:

In the current version it’s possible to replace existing pictures only.
Next hot fix (will be released in the beginning of next week) will allow to insert new pictures.

So I try

Picture image = new Aspose.PowerPoint.Picture(pres,MapPath(".") + “\Test.jpg”);
pres.Pictures.Add(image);

But I don’t see my image in the powerpoint…
I’m using the evalute version, is my code wring ???

Thanks

Hi,

This 2 lines only add image to presentation to allow use it on slides.
After that you should (for example) add PictureFrame to a slide.

Picture image = new Aspose.PowerPoint.Picture(pres,MapPath(".") + “\Test.jpg”);
int picid = pres.Pictures.Add(image);
slide.Shapes.AddPictureFrame(picid, 1000, 1000, 2000, 2000);

The same image can be used in different PictureFrames and on many slides.
Also please check programmer’s guide in Wiki for more examples.

Waou,
Thanks, it’s working…