Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Drawing namespace missing in aspnetVnext core CLR

System.drawing namespace is not available in the coreCLR . I want to resize the image in the server and return store it.

To give more context my application uses markdown for content edition . once the image is uploaded I want to resize and apply it in HTML . I am making an assembly to work with coreclr not on the desktop .

like image 708
satish Avatar asked Jan 13 '15 07:01

satish


3 Answers

The short answer (and only answer, for now) is yes, you're totally correct. System.Drawing isn't and will never be a good option for Core, especially since it's cross platform. We are looking at other solutions like a managed libgd wrapper as discussed here https://github.com/imazen/Graphics-vNext

like image 94
Scott Hanselman Avatar answered Nov 17 '22 19:11

Scott Hanselman


Alexander Köplinger started porting Mono's implementation of System.Drawing (and WinForms) to .NET Core. You can find his code at github.com/akoeplinger/mono-winforms-netcore.

As fair warning though, he did say this about it:

Mono's WinForms implementation didn't get much love in the recent years, so not sure if it has much use outside of experimental/hobby-stuff apps.

like image 34
bricelam Avatar answered Nov 17 '22 18:11

bricelam


If you are on windows you could try Magick.Net (which wraps ImageMagick) https://magick.codeplex.com/

like image 1
Mark Redman Avatar answered Nov 17 '22 18:11

Mark Redman