I’m using Aspose .NET product and I got an issue with PPT file when I try replace the image in PPT file.
Below is my sample code:
FileStream fStream = new FileStream(inputPptFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
Presentation presetation = new Presentation(fStream);
foreach (IPPImage Image in presentation.Images)
string target = “C:\temp.image”; // Random filePath
byte tempImage = File.ReadAllBytes(target);
tempImage = null;
My code only try to load the image to some random file and save it back to the PPT file. After saving image, my PPT file was corrupted. When I try to recover it then the image turn into black.
Here is my sample PPT file and sample text code: Sample.zip (985.6 KB)
I’m using Aspose .NET Slides 18.7 too.
Please help and give me some advise for this issue.
Dung H. Nguyen