I recently upgraded an ASP.NET MVC application from ASP.NET to the ASP.NET kernel.
In my controller action, I had a piece of code that relied on System.Drawing to create a profile image
using (FileStream stream = new FileStream(HttpContext.Server.MapPath($"~/Content/UserFiles/{AuthenticatedUser.Id.ToString()}.jpg"), FileMode.OpenOrCreate)) { Image image = Image.FromStream(model.DisplayPicture.InputStream); image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg); }
Image data is sent to the server as a Base64 encoded image.
data:image/png;base64,....
Since there is no System.Drawing in .NET Core, are there any other libraries that can do this?
source share