Hi Michel,
Thanks for your interest in Aspose.Slides.
I have worked with the scenario shared by you and have been able to observe the issue specified. Actually, PictureFillModeEx.Tile property does not seem to work at the moment for the shape. An issue with ID28934 has been added in our issue tracking system to further investigate and resolve the issue. However, at the moment you may please try using following statement and there will be no issue hopefully.
//Instantiate PrseetationEx class that represents the PPTX
PresentationEx pres = new PresentationEx();
//Get the first slide
SlideEx sld = pres.Slides[0];
//Add autoshape of rectangle type
int idx = sld.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 50, 150, 75, 150);
ShapeEx shp = sld.Shapes[idx];
//Set the picture
System.Drawing.Image img = (System.Drawing.Image)new Bitmap("d:\\Aspose Data\\Desert.jpg");
ImageEx imgx = pres.Images.AddImage(img);
shp.FillFormat.PictureFillFormat.Picture.Image = imgx;
//Set the fill type to Picture
shp.FillFormat.FillType = FillTypeEx.Picture;
shp.FillFormat.PictureFillFormat.PictureFillMode = PictureFillModeEx.Stretch;
//
shp.FillFormat.PictureFillFormat.Picture.Image = imgx;
//Write the PPTX file to disk
pres.Write("d:\\RectShpPic.pptx");
pres.Save("d:\\RectShpPic.tiff", Aspose.Slides.Export.SaveFormat.Tiff);
Thanks
and Regards,
Hello,
Thank you for your quick answer. actually we are already using the PictureFillModeEx.Stretch mode and we need to keep this for our project. It still does make the same problem. I don't really see any difference betwwen your sample of code and the one we are using, so if you see any, i'd be glad to discover what went wrong.
Thanks again for your help!
Hi Michel,
I have re-tested the code with Aspose.Slides for .NET 5.2.0 and it worked on my end. It will be really nice if you may please share the project code including the Aspose.Slides dll with me for further investigation.
Thanks and Regards,
Hi,
Hi Michel,
I have used Aspose.Slides for .NET 5.4.0 for my investigation and have been able to observe the shape background image in Tiff image. However, the generated PDF has not shape background image and I have updated the status of issue ID 28934. We will share further information with you once the issue is resolved. You may please try using Aspose.Slides for .NET. For your kind reference, I have shared generated presentation and Tiff image.
Thanks and Regards,
The issues you have found earlier (filed as SLIDESNET-28934) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.