Working with images
ImageSharp is a third-party cross-platform 2D graphics library. When .NET Core 1.0 was in development, there was negative feedback about the missing System.Drawing
namespace for working with 2D images. The ImageSharp project was started to fill that gap for modern .NET applications.
In their official documentation for System.Drawing
, Microsoft says, "The System.Drawing
namespace is not recommended for new development, due to not being supported within a Windows or ASP.NET service and it is not cross-platform. ImageSharp and SkiaSharp are recommended as alternatives."
Let us see what can be achieved with ImageSharp:
- Create a new console application project named
WorkingWithImages
, add it to the workspace, and select it as the active project for OmniSharp. - Create an
images
folder and download the nine images from the following link: https://github.com/markjprice/cs9dotnet5/tree/master/Assets/Categories - Open
WorkingWithImages...