System.Drawing.Common 9.0.4

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package System.Drawing.Common --version 9.0.4
                    
NuGet\Install-Package System.Drawing.Common -Version 9.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="System.Drawing.Common" Version="9.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="System.Drawing.Common" Version="9.0.4" />
                    
Directory.Packages.props
<PackageReference Include="System.Drawing.Common" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add System.Drawing.Common --version 9.0.4
                    
#r "nuget: System.Drawing.Common, 9.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=System.Drawing.Common&version=9.0.4
                    
Install System.Drawing.Common as a Cake Addin
#tool nuget:?package=System.Drawing.Common&version=9.0.4
                    
Install System.Drawing.Common as a Cake Tool

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

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid10 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed.  monotouch10 is compatible. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed.  xamarinmac20 is compatible. 
Xamarin.TVOS xamarintvos was computed.  xamarintvos10 is compatible. 
Xamarin.WatchOS xamarinwatchos was computed.  xamarinwatchos10 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5.7K)

Showing the top 5 NuGet packages that depend on System.Drawing.Common:

Package Downloads
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 as well as .NET Standard.

CompareNETObjects

What you have been waiting for. Perform a deep compare of any two .NET objects using reflection. Shows the differences between the two objects.

QRCoder

QRCoder is a simple library, written in C#.NET, which enables you to create QR codes.

Aspose.PDF

Aspose.PDF for .NET is a PDF document creation and manipulation component that enables your .NET applications to read, write and manipulate existing PDF documents without using Adobe Acrobat. It also allows you to create forms and manage form fields embedded in a PDF document. This component is written in managed C# and it allows developers to add PDF creation and manipulation functionality to their Microsoft .NET applications (WinForms, ASP.NET and .NET Compact Framework). Aspose.PDF for .NET is affordable and offers an incredible wealth of features including PDF compression options; table creation and manipulation; support for graph objects; extensive hyperlink functionality; extended security controls; custom font handling; integration with data sources; add or remove bookmarks; create table of contents; add, update, delete attachments and annotations; import or export PDF form data; add, replace or remove text and images; split, concatenate, extract or insert pages; transform pages to image; print PDF documents and much more.

Aspose.Cells

A powerful and fast library written in C# for manipulating and converting Excel(XLS, XLSX,XLSB), ODS, CSV,JSON and HTML files.

GitHub repositories (513)

Showing the top 20 popular GitHub repositories that depend on System.Drawing.Common:

Repository Stars
microsoft/PowerToys
Windows system utilities to maximize productivity
PowerShell/PowerShell
PowerShell for every system!
NickeManarin/ScreenToGif
🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
dotnet/runtime
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
rocksdanister/lively
Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
marticliment/UniGetUI
UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
duplicati/duplicati
Store securely encrypted backups in the cloud!
dotnet/BenchmarkDotNet
Powerful .NET library for benchmarking
dotnet/orleans
Cloud Native application framework for .NET
MathewSachin/Captura
Capture Screen, Audio, Cursor, Mouse Clicks and Keystrokes
SubtitleEdit/subtitleedit
the subtitle editor :)
Flow-Launcher/Flow.Launcher
:mag: Quick file search & app launcher for Windows with community-made plugins
mRemoteNG/mRemoteNG
mRemoteNG is the next generation of mRemote, open source, tabbed, multi-protocol, remote connections manager.
quasar/Quasar
Remote Administration Tool for Windows
JeffreySu/WeiXinMPSDK
微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 8.0。已支持微信公众号、小程序、小游戏、微信支付、企业微信/企业号、开放平台、JSSDK、微信周边等全平台。 WeChat SDK for C#.
lepoco/wpfui
WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
SixLabors/ImageSharp
:camera: A modern, cross-platform, 2D Graphics library for .NET
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
Version Downloads Last updated
10.0.0-preview.3.25173.2 4,502 4/10/2025
10.0.0-preview.2.25163.9 7,471 3/18/2025
10.0.0-preview.1.25080.3 7,922 2/25/2025
9.0.4 258,510 4/8/2025
9.0.3 552,343 3/11/2025
9.0.2 831,297 2/11/2025
9.0.1 1,157,477 1/14/2025
9.0.0 2,386,561 11/12/2024
9.0.0-rc.2.24474.1 49,743 10/8/2024
9.0.0-rc.1.24451.1 28,108 9/10/2024
9.0.0-preview.7.24405.4 15,157 8/13/2024
9.0.0-preview.6.24327.6 499,787 7/9/2024
9.0.0-preview.5.24306.5 30,067 6/11/2024
9.0.0-preview.4.24267.1 10,603 5/21/2024
9.0.0-preview.3.24172.9 30,570 4/11/2024
9.0.0-preview.2.24128.3 12,204 3/12/2024
9.0.0-preview.1.24081.2 29,946 2/13/2024
8.0.15 43,059 4/8/2025
8.0.14 188,088 3/11/2025
8.0.13 202,693 2/11/2025
8.0.12 549,278 1/14/2025
8.0.11 1,284,968 11/12/2024
8.0.10 4,293,343 10/8/2024
8.0.8 4,644,456 8/13/2024
8.0.7 3,213,264 7/9/2024
8.0.6 3,943,528 5/28/2024
8.0.5 1,203,402 5/14/2024
8.0.4 5,047,825 4/9/2024
8.0.3 2,266,648 3/12/2024
8.0.2 3,027,798 2/13/2024
8.0.1 4,040,151 1/9/2024
8.0.0 12,246,123 11/14/2023
8.0.0-rc.2.23479.14 84,886 10/10/2023
8.0.0-rc.1.23419.5 27,679 9/12/2023
8.0.0-preview.7.23375.5 71,463 8/8/2023
8.0.0-preview.6.23329.4 686 8/8/2023
8.0.0-preview.5.23280.5 45,613 6/23/2023
8.0.0-preview.4.23259.4 7,184 6/23/2023
8.0.0-preview.2.23128.3 103,417 3/14/2023
8.0.0-preview.1.23110.8 82,807 2/21/2023
7.0.0 106,822,615 11/7/2022
7.0.0-rc.2.22472.3 186,668 10/11/2022
7.0.0-rc.1.22426.10 162,836 9/14/2022
7.0.0-preview.7.22375.6 57,739 8/9/2022
7.0.0-preview.6.22324.4 81,724 7/12/2022
7.0.0-preview.5.22301.12 45,627 6/14/2022
7.0.0-preview.4.22229.4 42,644 5/10/2022
7.0.0-preview.3.22175.4 110,313 4/13/2022
7.0.0-preview.2.22152.2 45,072 3/14/2022
7.0.0-preview.1.22076.8 37,344 2/17/2022
6.0.0 410,858,515 11/8/2021
6.0.0-rc.2.21480.5 86,975 10/12/2021
6.0.0-rc.1.21451.13 94,644 9/14/2021
6.0.0-preview.7.21377.19 701,823 8/10/2021
6.0.0-preview.6.21352.12 98,834 7/14/2021
6.0.0-preview.5.21301.5 88,178 6/15/2021
6.0.0-preview.4.21253.7 75,679 5/24/2021
6.0.0-preview.3.21201.4 232,788 4/8/2021
6.0.0-preview.2.21154.6 99,962 3/11/2021
6.0.0-preview.1.21102.12 175,002 2/12/2021
5.0.3 23,273,930 11/7/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 34,548,167 3/9/2021 5.0.2 is deprecated because it is no longer maintained; 5.0.2 has at least one vulnerability with critical severity.
5.0.1 3,765,643 2/9/2021 5.0.1 is deprecated because it is no longer maintained; 5.0.1 has at least one vulnerability with critical severity.
5.0.0 365,826,509 11/9/2020 5.0.0 is deprecated because it is no longer maintained; 5.0.0 has at least one vulnerability with critical severity.
5.0.0-rc.2.20475.5 147,657 10/13/2020
5.0.0-rc.1.20451.14 128,409 9/14/2020
5.0.0-preview.8.20407.11 194,205 8/25/2020
5.0.0-preview.7.20364.11 141,296 7/21/2020
5.0.0-preview.6.20305.6 120,748 6/25/2020
5.0.0-preview.5.20278.1 40,597 6/10/2020
5.0.0-preview.4.20251.6 138,365 5/18/2020
5.0.0-preview.3.20214.6 84,762 4/23/2020
5.0.0-preview.2.20160.6 85,603 4/2/2020
5.0.0-preview.1.20120.5 51,235 3/16/2020
4.7.3 7,644,950 11/7/2021
4.7.2 42,072,455 2/9/2021
4.7.1 4,663,071 11/9/2020 4.7.1 has at least one vulnerability with critical severity.
4.7.0 598,943,923 12/3/2019 4.7.0 has at least one vulnerability with critical severity.
4.7.0-preview3.19551.4 60,053 11/13/2019 4.7.0-preview3.19551.4 has at least one vulnerability with critical severity.
4.7.0-preview2.19523.17 30,927 11/1/2019 4.7.0-preview2.19523.17 has at least one vulnerability with critical severity.
4.7.0-preview1.19504.10 33,417 10/15/2019 4.7.0-preview1.19504.10 has at least one vulnerability with critical severity.
4.6.2 52,951 1/14/2020 4.6.2 has at least one vulnerability with critical severity.
4.6.1 2,396,647 11/18/2019 4.6.1 has at least one vulnerability with critical severity.
4.6.0 63,537,205 9/23/2019 4.6.0 has at least one vulnerability with critical severity.
4.6.0-rc1.19456.4 79,422 9/16/2019 4.6.0-rc1.19456.4 has at least one vulnerability with critical severity.
4.6.0-preview9.19421.4 29,156 9/4/2019 4.6.0-preview9.19421.4 has at least one vulnerability with critical severity.
4.6.0-preview9.19416.11 1,271 9/4/2019 4.6.0-preview9.19416.11 has at least one vulnerability with critical severity.
4.6.0-preview8.19405.3 303,498 8/13/2019 4.6.0-preview8.19405.3 has at least one vulnerability with critical severity.
4.6.0-preview7.19362.9 90,600 7/23/2019 4.6.0-preview7.19362.9 has at least one vulnerability with critical severity.
4.6.0-preview6.19303.8 14,562,115 6/12/2019 4.6.0-preview6.19303.8 has at least one vulnerability with critical severity.
4.6.0-preview6.19264.9 1,236 9/4/2019 4.6.0-preview6.19264.9 has at least one vulnerability with critical severity.
4.6.0-preview5.19224.8 161,660 5/6/2019 4.6.0-preview5.19224.8 has at least one vulnerability with critical severity.
4.6.0-preview4.19212.13 23,155 4/18/2019 4.6.0-preview4.19212.13 has at least one vulnerability with critical severity.
4.6.0-preview3.19128.7 346,782 3/6/2019 4.6.0-preview3.19128.7 has at least one vulnerability with critical severity.
4.6.0-preview.19073.11 55,120 1/29/2019 4.6.0-preview.19073.11 has at least one vulnerability with critical severity.
4.6.0-preview.18571.3 107,542 12/3/2018 4.6.0-preview.18571.3 has at least one vulnerability with critical severity.
4.5.2 74,988 2/9/2021 4.5.2 has at least one vulnerability with critical severity.
4.5.1 54,853,797 10/1/2018 4.5.1 has at least one vulnerability with critical severity.
4.5.0 109,842,242 5/29/2018 4.5.0 has at least one vulnerability with critical severity.
4.5.0-rc1 185,761 5/6/2018 4.5.0-rc1 has at least one vulnerability with critical severity.
4.5.0-preview2-26406-04 870,965 4/10/2018 4.5.0-preview2-26406-04 has at least one vulnerability with critical severity.
4.5.0-preview1-26216-02 1,444,921 2/26/2018 4.5.0-preview1-26216-02 has at least one vulnerability with critical severity.
4.5.0-preview1-25914-04 13,661,606 11/15/2017 4.5.0-preview1-25914-04 has at least one vulnerability with critical severity.
4.5.0-preview1-25718-03 66,121 9/19/2017 4.5.0-preview1-25718-03 has at least one vulnerability with critical severity.