Why do you need System.Drawing?
The System.Drawing graphics library is based on the GDI+ system library, which has some limitations:
- the GDI+ library is not included in all versions of Windows;
- some types of graphics from the GDI+ library + (Font, Bitmap) don’t work in Windows services and ASP.NET Core applications;
- on Linux and macOS platforms, GDI+ functions are realized by the libgdiplus library that supports not all GDI+ functions and is not set by default on most versions of Linux;
- starting with .NET 6.0, officially the System.Drawing is supported only for Windows operating systems.
All of this is described on the official Microsoft website.
To solve the problems described above, we added the Stimulsoft.Drawing library. It is based on platform-independent libraries - ImageSharp and Fonts from SixLabors company.
Where may you use it?
The Stimulsoft.Drawing library is included in product packages that have .NET Core components. We are talking, of course, about Reports.WEB and Dashboards.WEB, Reports.BLAZOR and Dashboards.BLAZOR, and Reports.ANGULAR.
Where can I download it?
You can download product packages from our company’s website or the NuGet package manager.
Which work mode should I select?
Now the Stimulsoft.Drawing library is used in all our .NET Core products. By default, a new work mode is used – the GraphicsEngine property is set in the ImageSharp value. We made this for more flexible compatibility of our components with various operating systems. However, if you need to use the GDI+ standard library, you should just reset the GraphicsEngine property to this value. For example,
Stimulsoft.Drawing.Graphics.GraphicsEngine = Stimulsoft.Drawing.GraphicsEngine.Gdi
.We have prepared a short video that visually demonstrates the process.
Some features
Stimulsoft.Drawing does not implement all the functionality of the standard library. If, while working, the following error occurs: "The method or operation is not implemented", it means that the functionality is not supported. In this case, our advice is to switch the mode of library work to GDI, i.e., set the values of the GraphicsEngine property to GDI.
Stimulsoft.Drawing does not implement all the functionality of the standard library. If, while working, the following error occurs: "The method or operation is not implemented", it means that the functionality is not supported. In this case, our advice is to switch the mode of library work to GDI, i.e., set the values of the GraphicsEngine property to GDI.