Hi team,
I want to change the value of pictureFrame.PictureFormat.Picture.LinkPathLong,
but unfortunately, after changing, pictureFrame.PictureFormat.Picture.Image became null.
I tried to preserve the data of Image, assign it back Image, save to output file, but image has been still removed.
Please see:
var presentation = new Presentation(inputFile);
foreach(var slide in presentation.slides)
{
foreach(Shape shape in slide.Shapes)
{
var pictureFrame = shape as PictureFrame;
var image = pictureFrame.PictureFormat.Picture.Image;
pictureFrame.PictureFormat.Picture.LinkPathLong = “something”;
pictureFrame.PictureFormat.Picture.Image = image;
}
}
presentation.Save(outputFile);
Here is my sample.
test.zip (45.8 KB)
Please support me to keep image.
Thanks.