Shape to Image in C#: Vertical Bars Enclosing a Matrix Appear Shorter

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,

@bhav

@bhav,
Thank you for reporting on the issue. I’ve reproduced the problem with displaying the vertical bars when converting the shape to an image. We apologize for any inconvenience caused.

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-44958

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.