CloneSlide Throws System.ArgumentException: Parameter Is Not Valid

Hi team

I’m getting an error in production when creating to Clone slides containing certain images.

The issue is limited to single, random images in the slides.

The exception:

System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at .(Single , Single )
   at e.(Byte[] , Int32 , Int32 )
   at Aspose.Slides.ImageCollection.(ISvgImage , Single , Single )
   at Aspose.Slides.ImageCollection.(ISvgImage , Single , Single )
   at e.(ISlidesPicture )
   at .(ISlidesPicture ,  , e )
   at .(PictureFillFormat ,  , e )
   at .(IPictureFrame ,  , e )
   at e.(IGroupShape ,  , e , e )
   at .(IBaseSlide ,  , e )
   at .(ISlide )
   at e.( , ISlide , e )
   at e.(IPresentation , ILayoutSlide , ISlide )
   at Aspose.Slides.SlideCollection.AddClone(ISlide sourceSlide, ILayoutSlide destLayout)

File for recreating the issue: large_test_file_image_one.pptx - Google Slides

Note I had a similar issue in the past that has been solved - but for this image type, it happens again.

You might consider exploring a wider range of potential images to fully fix it.

System: Windows Server 2019 and Windows 11
.NET version: .NET Core 3.1

best regards
Anders

@ahthomsen,
Thank you for reporting the issue. I’ve reproduced the problem with cloning the slide containing the SVG image and added a ticket with ID SLIDESNET-43372 to our issue tracking system. Our development team will investigate the case. You will be notified when the issue is resolved.

Thank you for the note, we will take it into account. We apologize for any inconvenience.

The issues you have found earlier (filed as SLIDESNET-43372) have been fixed in Aspose.Slides for .NET 22.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.