dmester/jdenticon-net

Depend on CoreCompat.System.Drawing instead of System.Drawing for .net core compatibility

thiagomajesk opened this issue · 4 comments

Depending on Bitmap makes the Bitmap extension unavailable for .net core projects. Please consider replacing it with another alternative as seen here:
https://blogs.msdn.microsoft.com/dotnet/2017/01/19/net-core-image-processing/

There are no dependencies to System.Drawing except from in the Jdenticon.Gdi package, which is only intended for legacy WinForms applications. You should be able to use the SaveAsPng and SaveAsSvg/ToSvg extension methods on .NET Core by only including the Jdenticon-net package. See the compatibility chart below.

Extension Method Package Supports .NET Core
Identicon.Draw(Graphics, Rectangle) Jdenticon.Gdi
Identicon.Draw(DrawingContext, Rectangle) Jdenticon.Wpf
Identicon.SaveAsEmf Jdenticon.Gdi
Identicon.SaveAsPng Jdenticon-net
Identicon.SaveAsSvg Jdenticon-net
Identicon.ToBitmap Jdenticon.Gdi
Identicon.ToSvg Jdenticon-net
Identicon.ToVisual Jdenticon.Wpf

What is your use case? Do you need an explicit Bitmap extension on .NET Core?

@dmester
I was talking exactly about Jdenticon.Gdi extensions - I didn't know this was specific for winforms...
But I suppose this could be provided in the core lib as an alternative for people wanting to work with Bitmap, no!?

I guess System.Drawing.Common is a better alternative than CoreCompat.System.Drawing these days. I need to do some further investigation, I will come back to you.

Support for System.Drawing.Common was added in release 2.2.0.