Hi Aspose
I am trying to show two images on a single slide using below code. but the second image is not coming , it is throwing error for the secong image (Please refer attached image here).
//Create new SlideEx
Present.Slides.AddClone(Present.Slides[2]);
string tempFile = Path.GetTempFileName();
ChartExpt.Width = Unit.Pixel(600);
ChartExpt.Height = Unit.Pixel(500);
ChartExpt.Save(tempFile, ChartImageFormat.Png);
string tempFile2 = Path.GetTempFileName();
chtsecExport.Width = Unit.Pixel(600);
chtsecExport.Height = Unit.Pixel(500);
chtsecExport.Save(tempFile2, ChartImageFormat.Png);
//Get SlideEx position
SlideEx NewSlide = Present.Slides[Present.Slides.Count - 1];
ShapeEx shapeEx = FindShape(NewSlide, "ParentChart");
shapeEx.FillFormat.FillType = FillTypeEx.Picture;
shapeEx.FillFormat.PictureFillFormat.PictureFillMode = PictureFillModeEx.Stretch;
System.Drawing.Image img = (System.Drawing.Image)new Bitmap(tempFile);
ImageEx imgx = Present.Images.AddImage(img);
shapeEx.FillFormat.PictureFillFormat.Picture.Image = imgx;
//Get SlideEx position
//NewSlide = Present.Slides[Present.Slides.Count - 1];
ShapeEx shapeEx2 = FindShape(NewSlide, "ChildChart");
shapeEx2.FillFormat.FillType = FillTypeEx.Picture;
shapeEx2.FillFormat.PictureFillFormat.PictureFillMode = PictureFillModeEx.Stretch;
System.Drawing.Image img2 = (System.Drawing.Image)new Bitmap(tempFile2);
ImageEx imgx2 = Present.Images.AddImage(img2);
shapeEx.FillFormat.PictureFillFormat.Picture.Image = imgx2;
Version which i am using is Aspose.Slides 2007 Evaluation version.To see the error please refer attached image file here.
Please reply ASAP.
Thanks
Waiting for reply
Binod