Create Presentation from some Images

Dear Aspose peoples,

I'm new in Aspose Slides and I need create presentation from some image files.

(In 1 slide is 1 image object and scale Image object to slide size (scale to fit))

Thank you,

Roman

Hi Roman,


Thanks for your interest in Aspose.Slides.

I have observed the requirements shared and suggest you to please try using the following sample code on your end to serve the purpose. Please share, if I may help you further in this regard.

public static void AddPicFrame()
{
//Instantiate PrseetationEx class that represents the PPTX

using (PresentationEx srcPres = new PresentationEx())
{

//Get the first slide
SlideEx sld = srcPres.Slides[0];

//Instantiate the ImageEx class
System.Drawing.Image img = (System.Drawing.Image)new Bitmap(“d:\pptx\asp.jpg”);
ImageEx imgx = srcPres.Images.AddImage(img);

//Add Picture Frame with height and width equivalent of Picture
sld.Shapes.AddPictureFrame(ShapeTypeEx.Rectangle, 0, 0, srcPres.SlideSize.Size.Width, srcPres.SlideSize.Size.Height, imgx);

//Write the PPTX file to disk
srcPres.Write(“d:\pptx\RectPicFrame.pptx”);
}

}


Many Thanks,