Free Support Forum - aspose.com

Adding a Picture frame in a Presentation using Aspose.Slides

Hi,

I am trying to add a picture frame in the presentation using the Aspose.Slides for the newly created Presentation using the cloneslide option.

I am using the following code,

Aspose.Slides.Picture objPicture = new Aspose.Slides.Picture(oPres, strPictureFileName);

int pictureID = oPres.Pictures.Add(objPicture);

int pictureWidth = Convert.ToInt32((float)oPres.Pictures.GetPictureById(pictureID).Image.Width);

int pictureHeight = Convert.ToInt32((float)oPres.Pictures.GetPictureById(pictureID).Image.Height);

oSlides.Shapes.AddPictureFrame(pictureID,( pictureWidth) / 2,(pictureHeight) / 2,pictureWidth,pictureHeight);

But the created presentation doesnot contain the picture frame. So please Let me know what i am missing or wrong in adding a picture frame.....

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

As your issue is regarding Aspose.Slides, I am moving your thread to Aspose.Slides forum where Aspose.Slides team member will reply you soon regarding your issue.

Thank You & Best Regards,

Hi Arun,

The example provided by you to add a picture frame is working fine on my end. I am using the latest Aspose.Slides for .NET 4.0.0 that can be downloaded here.

Hi msabir,

Thanks for your information.

It really worked with the new version. I not know what i made wrong in the older version or in the code.

Regards,

Arunkumar