Hi,
Adding more to Sabir's comments, you can also use the following code snippet to insert an image as PictureFrame inside PPTX file.
[C# .NET]
//Read the source presentation which has a single blank slide
PresentationEx pres = new PresentationEx();
//Get the first slide which is Master slide added by default when Presentation object is created
SlideEx sld = pres.Slides[0];
//Read the image from disk
System.Drawing.Image img = Bitmap.FromFile(@"c:/test/Blue+hills.jpg");
//Add the image inside the presentation
//and save the extendend image object for later use
ImageEx imgEx = pres.Images.AddImage(img);
//Add the picture frame with extended image
sld.Shapes.AddPictureFrame(ShapeTypeEx.Rectangle, 60, 70, 600, 400, imgEx);
//Write the presentation on disk
pres.Write(@"c:\\test\\PPTXwithImage_output.pptx");
You can also use PictureFrameEx class object to load the picture and add it to presentation slide. When using PictureFrameEx object, you can also add a linked image or import it from another pptx file. For that reason, Just create normal PictureFrameEx with null instead of image and set Url property for it's PictureEx object later on. Please have a look over the following code snippet.
[C# .NET]
//Read the source presentation which has a single blank slide
PresentationEx pres = new PresentationEx();
//Get the first slide which is Master slide added by default when Presentation object is created
SlideEx sld = pres.Slides[0];
int index = sld.Shapes.AddPictureFrame(ShapeTypeEx.Rectangle, 60, 70, 600, 400, null);
PictureFrameEx picf = sld.Shapes[index] as PictureFrameEx;
picf.PictureFormat.Picture.Url = @"c:/test/Blue+hills.jpg";
//Write the presentation on disk
pres.Write(@"c:\\test\\PPTXwithImage_output.pptx");
The image file "Blue+hills.jpg" and resultant PPTX "PPTXwithImage_output.pptx" are also in attachment. I hope it can resolve your problem.