Hi Team,
I have a slide with maths matrix equation. I use Aspose version 25.5 to get image of this shape. I see that the matrix determinant bars (vertical bars enclosing the matrix) appear shorter in the image obtained from Aspose as compared to their original height in the PPTX. I am attaching the PPTX and image of the second slide shape obtained from Aspose.
Screenshot (110).png (52.8 KB)
sample.zip (32.5 KB)
Code:
using Aspose.Slides;
using Aspose.Slides.Export;
using System.Drawing.Imaging;
class Program
{
static void Main(string[] args)
{
try
{
// Load the presentation
using (Presentation presentation = new Presentation("sample.pptx"))
{
int shapeCounter = 1;
// Loop through all slides
for (int slideIndex = 0; slideIndex < presentation.Slides.Count; slideIndex++)
{
// Get current slide
ISlide slide = presentation.Slides[slideIndex];
// Process each shape in the current slide
foreach (var curShape in slide.Shapes)
{
using (var curImage = curShape.GetImage())
{
// Save the image with a unique name including slide number
string fileName = $"slide_{slideIndex + 1}_shape_{shapeCounter}.png";
curImage.Save(fileName, Aspose.Slides.ImageFormat.Png);
Console.WriteLine($"Image saved successfully as {fileName}");
shapeCounter++;
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");
}
}
}
Pls help me resolve this issue. Thank you,