I had a project working well in .Net 4.6.2, which makes heavy usage of converting byte[] to Bitmap.
public static Bitmap ByteArrayToImage(byte[] source)
{
TypeConverter tc = TypeDescriptor.GetConverter(typeof(Bitmap));
return (Bitmap)tc.ConvertFrom(source);
}
However, I have since upgraded projects to .Net Core 2.1 and this no longer works. I've read, and a few people have issues, but battling to find a fix.
TypeConverter cannot convert from System.Byte[]
Is there a way in 2.1 to achieve this conversion? It looks like https://github.com/SixLabors/ImageSharp might work, but when I search for it in Nuget, I get no results.