Open tocsoft opened 6 years ago
Microsoft has recently released System.Drawing.Common , which is a cross platform and NetStandard compatible package of the classic NetFX exclusive System.Drawing.Bitmap namespace.
So maybe it's worth to take into account too... but, as @saucecontrol commented here ... maybe not.
The sad thing is, the majority of devs will continue using System.Drawing because that's what they know. And a large percentage of them will take a Microsoft-authored package over literally anything else. One could at least hope that easy integration and a couple of unique features would tempt some devs to dip a toe in the ImageSharp waters. Maybe then they'll see the light :)
@tocsoft There's much more image interops than just these, and imho, some critical ones that are worth of attention;
Windows.Graphics.Imaging.SoftwareBitmap
, that is typically used along with System.Windows.Media.Capture
namespace. To make things worse, the whole System.Windows.Media.Capture
uses, extensively, the Windows.Storage.Streams.IBuffer
which is a half baked analogue of SpanWe're only writing these to help migration. I think it's up to individual library providers to create interop solutions. DirectX, OpenGL and Vulkan textures are going to be included in gaming engines and will be specific to their API's.
Veldrid for example has managed it without us having to write a line of code.
It would be very helpful if this was provided out of the box like SkiaSharp does: https://github.com/mono/SkiaSharp/blob/master/source/SkiaSharp.Views/SkiaSharp.Views.UWP/UWPExtensions.cs
ImageSharp should provide an initial standard structure for adding library inter-op apis.
System.Drawing.Image
into anImageSharp.Image<TPixel>
. Simple API the allows for converting anImageSharp.Image<TPixel>
into aSystem.Drawing.Image
. ** Simple API for creating anImage<TPixel>
that wraps the memory used by aSystem.Drawing.Image
UIImage
into anImageSharp.Image<TPixel>
. Simple API the allows for converting anImageSharp.Image<TPixel>
into aUIImage
. Simple API the allows for convertingCIImage
into anImageSharp.Image<TPixel>
. Simple API the allows for converting anImageSharp.Image<TPixel>
into aCIImage
. ** Simple API for creating anImage<TPixel>
that wraps the memory used by the various image types (if possible)Maybe we just need to provide a
System.Drawing
version (as a new packageSixLabors.ImageSharp.InterOp.SystemDrawing
) but would then allow third party developers to be able to follow common patterns to allow them