Hi,
I’m having a problem with IPPImage.ReplaceImage method. When testing with an input .ppt file containing an external image that is grouped, Aspose.Slides.Presentation.Images.Count = 2.
After using IPPImage.ReplaceImage method and save to the outputFile, I checked the outputFile and the Aspose.Slides.Presentation.Images.Count = 3.
Sample code:
string inputFile = "D:\\external_image_grouped.ppt";
string outputFile = "D:\\external_image_grouped_out.ppt";
string sampleImage = "D:\\sample_image.jpg";
using (var inputStream = new FileStream(inputFile, FileMode.Open,
FileAccess.Read, FileShare.ReadWrite))
{
int retVal = 0;
Presentation inputPresentation = new Presentation(inputStream);
var count = inputPresentation.Images.Count; // count = 2
foreach (var tmp in inputPresentation.Images)
{
var image = File.ReadAllBytes(sampleImage);
tmp.ReplaceImage(image);
}
inputPresentation.Save(outputFile, SaveFormat.Ppt);
}
using (var outputStream = new FileStream(outputFile, FileMode.Open,
FileAccess.Read, FileShare.ReadWrite))
{
int retVal = 0;
Presentation outputPresentation = new Presentation(outputStream);
var count = outputPresentation.Images.Count; // count = 3
}
Here is the sample file that I created to test external_image_grouped.zip (27.8 KB)
Please help me check and investigate the problem.
Thank you.
@dunghnguyen,
Thank you for contacting support.
Unfortunately, I was unable to reproduce the issue you described with Aspose.Slides for .NET 23.5. Please check your results using the latest version of Aspose.Slides for .NET if it is possible. If the issue persists, please share the following additional information:
- OS version on which the code was executed
- .NET target platform in your app
- Aspose.Slides version you used
- any additional data
Hi @andrey.potapov,
Thank you for your response.
Here is my information:
- Windows 10, 11
- .NET 5.0
- Aspose.Slides version 21.2.0
I tried to upgrade to Aspose.Slides for .NET ver 23.1.0 and this problem is still not fixed.
@dunghnguyen,
I am still unable to reproduce the issue on my end with Aspose.Slides for .NET 21.2, 23.1, 23.5. Please check the problem carefully again with the presentation file you provided. We also recommend that you use the latest version of Aspose.Slides. If the issue persists, please isolate the problem and share more information on how to reproduce it from our end.
Hi @andrey.potapov,
I’ve checked again and edited the above sample file. It is my mistake when attaching the file.
So, could you please reproduce again with a new sample external_image_grouped.zip (27.8 KB)
I am sorry because of this mistake
Thank you so much!
@dunghnguyen,
Thank you for the presentation file. I reproduced the problem you described.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESNET-44036
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
1 Like
@andrey.potapov,
Please let me know if you have any updates about this ticket.
Thank you.
@dunghnguyen,
Of course, you will be notified when the issue is resolved.
1 Like
The issues you found earlier (filed as SLIDESNET-44036) have been fixed in Aspose.Slides for .NET 23.9 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.