System.Drawing.Common 9.0.0-preview.1.24081.2

System.Drawing.Common

The System.Drawing.Common package allows .NET Core and .NET 6+ applications to access GDI+ graphics functionality. This package is especially useful for porting .NET Framework applications that rely on the System.Drawing namespace.

Getting Started

To get started with System.Drawing.Common, install it using the NuGet Package Manager, the .NET CLI, or by editing your project file directly.

NOTE: If you are developing a WinForms application, you do not need to install the System.Drawing.Common package separately (to this end, you use the Sdk attribute for the Project element like <Project Sdk="Microsoft.NET.Sdk"> in the .csproj or the .vbproj file and then specify <UseWindowsForms>true</UseWindowsForms>). This package is then automatically included as part of the .NET SDK for WinForms Apps, which means you can start using the System.Drawing namespace right away in your WinForms projects.

Usage

The following examples demonstrate some basic tasks you can accomplish with System.Drawing.Common.

Create a Simple Bitmap and Save it

C#

using System.Drawing;

class Program
{
    static void Main()
    {
        using (Bitmap bitmap = new Bitmap(100, 100))
        {
            using (Graphics g = Graphics.FromImage(bitmap))
            {
                g.Clear(Color.Red);
            }
            bitmap.Save("output.bmp");
        }
    }
}

VB

Imports System.Drawing

Module Program
    Sub Main()
        Using bitmap As New Bitmap(100, 100)
            Using g As Graphics = Graphics.FromImage(bitmap)
                g.Clear(Color.Red)
            End Using
            bitmap.Save("output.bmp")
        End Using
    End Sub
End Module

Additional Documentation

For more in-depth tutorials and API references, you can check the following resources:

Feedback

Showing the top 20 packages that depend on System.Drawing.Common.

Packages Downloads
Aspose.Cells
A powerful and fast library written in C# for manipulating and converting Excel(XLS, XLSX,XLSB), ODS, CSV,JSON and HTML files.
57
Aspose.Cells
A powerful and fast library written in C# for manipulating and converting Excel(XLS, XLSX,XLSB), ODS, CSV,JSON and HTML files.
190
FastReport.Compat
Common compatible types for FastReport.Net
5,994
FastReport.Core
FastReport.Core is a full-featured reporting solution for .Net Core and .Net Framework 4.x. Various report objects will allow your report to look exactly how you want it to: 13 types of bands, 25 types of barcodes, table object, diagram, maps, shapes, line, PolyLine, Polygon and many more. FastReport.Core supports export to various popular formats, such as PDF/A, Excel, Word, Open Office, HTML, CSV, Json, XAML, ZPL, etc.
3,866
FastReport.DataVisualization
Charting library
6,011
Microsoft.Windows.Compatibility
This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard. When using NuGet 3.x this package requires at least version 3.4.
689
Quantum.Framework.Core.StandardLib
Package Description
51
Quantum.Framework.Core.StandardLib
Package Description
53
Quantum.Framework.Core.StandardLib
Package Description
54
Quantum.Framework.Core.StandardLib
Package Description
57
Quantum.Framework.Core.StandardLib
Package Description
61
Quantum.Framework.Core.StandardLib
Package Description
70
Quantum.Framework.Core.StandardLib
Package Description
71
Quantum.Framework.Core.StandardLib
Package Description
110
Quantum.Framework.Core.StandardLib
Package Description
149
Quantum.Framework.Core.StandardLib
Package Description
157
Quantum.Framework.Core.StandardLib
Package Description
164
SoapCore
SOAP protocol middleware for ASP.NET Core
66
ThoughtWorks.QRCode.Standard
二维码识别生成类库ThoughtWorks.QRCode标准版 ThoughtWorks.QRCode很好用,但是该类库不支持标准库 于是我通过反编译dll,做了个标准版,并依赖引用了System.Drawing.Common 另外我发现当解析数据过长,或者QRCodeVersion>=30时,会抛出异常, 这个我做了修复,使用自动QRCodeVersion,也就是这个属性无需赋值,可以参考readme里面的使用示例 作者haoersheng没有留联系方式,如有侵权请联系我删除!!!
1,680

.NET Framework 4.6.2

  • No dependencies.

.NET 8.0

.NET 9.0

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
9.0.0-preview.4.24267.1 7 05/23/2024
9.0.0-preview.3.24172.9 8 04/23/2024
9.0.0-preview.2.24128.3 5 03/24/2024
9.0.0-preview.1.24081.2 6 03/12/2024
8.0.5 9 05/16/2024
8.0.4 5 05/08/2024
8.0.3 6 05/19/2024
8.0.2 5 04/26/2024
8.0.1 4 01/10/2024
8.0.0 3 12/29/2023
8.0.0-rc.2.23479.14 7 10/12/2023
8.0.0-rc.1.23419.5 8 09/29/2023
8.0.0-preview.7.23375.5 4 04/26/2024
8.0.0-preview.5.23280.5 7 07/27/2023
8.0.0-preview.4.23259.4 7 05/16/2024
8.0.0-preview.2.23128.3 3 04/08/2023
8.0.0-preview.1.23110.8 4 07/20/2023
7.0.0 11 02/09/2023
7.0.0-rc.2.22472.3 4 05/03/2024
7.0.0-rc.1.22426.10 6 06/01/2024
7.0.0-preview.5.22301.12 7 06/11/2023
6.0.2-mauipre.1.22102.15 4 05/25/2024
6.0.2-mauipre.1.22054.8 7 05/09/2024
6.0.0-preview.7.21377.19 2 05/30/2024
6.0.0-preview.6.21352.12 5 04/25/2024
4.7.0-preview3.19551.4 5 06/01/2024
4.7.0-preview1.19504.10 3 04/26/2024
4.6.0-rc1.19456.4 3 06/14/2022
4.6.0-preview6.19264.9 7 06/09/2022
4.5.1 1 06/01/2024
4.5.0-rc1 2 05/24/2024
4.5.0-preview1-25718-03 3 04/26/2024