Question to Slides.PictureFillMode.Stretch

Hi all,

Currently we are using within a .net Framework 4.0 application a demo version of Aspose.Slides containing the DLL with version We have to generate a Powerpoint with a couple of slides containing tables with various content. The table generation itself works fine, putting in text and pictures too. The problem is with the scaling of background pictures. Because of the user wants to have the possibility to exchange columns in the table it is necessary to add pictures as cell background. In this way they move together with the whole column to their new position. But background pictures are stretched to the whole width of the cell, which can vary in a wide range. In Powerpoint 2010 I can manually change the picture stretching right clicking on the pitcture, selectin "format shape", "Fill", "Picture or text fill" and then increasing the stretch options, for example "Right" to 10%. In this cas e the pictures width will be squeezed a littel bit and a white bar is shown on the right hand side. This would be okay for us.

But the question is now: How can we do this with Aspose.Slides? Is there any function inside the API to change the stretching of the background picture as mentioned above?

Here is the piece of code we are using for setting the picture as cell background:


private void InsertImageIntoPPTXCell(Slides.ICell cell, Stream img)


System.Drawing.Image img2 = (System.Drawing.Image)new Bitmap(img);

Slides.IPPImage picId = pres.Images.AddImage(img2);

cell.FillFormat.FillType = Slides.FillType.Picture;

cell.FillFormat.PictureFillFormat.PictureFillMode = Slides.PictureFillMode.Stretch; // Using Tile instead is not required

cell.FillFormat.PictureFillFormat.Picture.Image = picId;



Thanks in advance for fast help.

Kind regards Steffen Otto

Hi Steffen Otto,

I have observed the issue specified by you and request you to please share the working sample application along with generated presentation and desired presentation. I will investigate the issue further on my end to help you further in this regard.

Many Thanks,