Previously it was System.Drawing namespace for images. I am not sure which library do I need in asp.net 5 to have an object of Image
type.
Place the images in a new folder named images in the app's web root ( wwwroot ). The use of the images folder is only for demonstration purposes. You can organize images in any folder layout that you prefer, including serving the images directly from the wwwroot folder.
There's a bunch of libraries that can fill the gap, afaik there is no drop in replacement for System.Drawing.
I've hit the same problem and I'm looking at these libs:
Update
Looks these libs are not quite ready to work without System.Drawing yet. There are reports that you can still reference System.Drawing if an older .Net version is installed on the server. Add the following bits to your project.json:
"frameworks": {
"aspnet50": {
"dependencies": {
"System.Drawing": ""
}
}
}
More info on this topic here: https://github.com/imazen/Graphics-vNext . The gist of that discussion is that there is no real alternative yet.
Update 2
Scott Hanselman has blogged about this. Seems that server side image processing is not a priority at all for Microsoft at this point.
So for now the best bet is still on the projects mentioned above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With