IImageCollection::AddImage(Image image) Broken After 21.4.0

protected void AddPicture(IPresentation presentation, Image image /* ... */)
	var presentationImage = presentation.Images.AddImage(image);
	/* ... */

worked fine in Aspose.Slides.NET.21.3.0
but gives error in 21.4 or 21.5: cannot convert from 'System.Drawing.Image' to 'System.IO.MemoryStream'

image.png (15.1 KB)

image.png (20.2 KB)

Welcome to our community! Thank you for the query. I will answer you later.

Unfortunately, I have not managed to reproduce this compiler error. Adding System.Drawing.Image object works fine with the versions of Aspose.Slides you specified. Please try to rebuild your application. If the issue persists, please share additional information about how to reproduce the error on our side.

Thank you for looking into this so quickly! I really appreciate it.
I’ve tried some things on my end, and now I see Error CS1705

Assembly ‘Aspose.Slides’ with identity ‘Aspose.Slides, Version=, Culture=neutral, PublicKeyToken=716fcc553a201e56’ uses ‘System.Drawing.Common, Version=, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ which has a higher version than referenced assembly ‘System.Drawing.Common’ with identity ‘System.Drawing.Common, Version=, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’

I’m using .Net 5.0.301, with Aspose being the only added package. It appears .Net 5 comes with System.Drawing.Common, and Aspose 21.4/5 is looking for System.Drawing.Common

It seems Apose 21.5 includes System.Drawing.Common 4.5.0. Could I modify my “using” to use that instead of the .Net 5’s?

Unfortunately, I have not managed to reproduce this compiler error as well. Could you share a simple project with this error, please?

Hello, again.
I just had to manually update System.Drawing.Common. The one included in .Net 5 was v., while the Aspose requires >= 4.5. I got the latest one 5.0.2 via NuGet and it now compiles.
Thank you very much for helping me with this!