We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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: https://docs.google.com/presentation/d/1QebJz8BTZo0aKCji_HwPsMW3HPMaKcUt/edit?usp=sharing&ouid=107504824383276107804&rtpof=true&sd=true

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.