System.Drawing.Common
9.0.0
Prefix Reserved
dotnet add package System.Drawing.Common --version 9.0.0
NuGet\Install-Package System.Drawing.Common -Version 9.0.0
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
paket add System.Drawing.Common --version 9.0.0
#r "nuget: System.Drawing.Common, 9.0.0"
// Install System.Drawing.Common as a Cake Addin #addin nuget:?package=System.Drawing.Common&version=9.0.0 // Install System.Drawing.Common as a Cake Tool #tool nuget:?package=System.Drawing.Common&version=9.0.0
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:
- NuGet Gallery | System.Drawing.Common
- System.Drawing.Common Namespace | Microsoft Docs
- Drawing with System.Drawing.Common | Microsoft Learn
Feedback
- Open an issue on the GitHub repository
- Reach out on Twitter with the hashtag #winforms
- Join our Discord channel: dotnet/Discord
Product | Versions 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. |
.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. |
-
.NETFramework 4.6.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net8.0
- Microsoft.Win32.SystemEvents (>= 9.0.0)
-
net9.0
- Microsoft.Win32.SystemEvents (>= 9.0.0)
NuGet packages (3.4K)
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 (461)
Showing the top 5 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.
|
Version | Downloads | Last updated | |
---|---|---|---|
9.0.0 | 87,361 | 11/12/2024 | |
9.0.0-rc.2.24474.1 | 31,133 | 10/8/2024 | |
9.0.0-rc.1.24451.1 | 20,623 | 9/10/2024 | |
9.0.0-preview.7.24405.4 | 13,331 | 8/13/2024 | |
9.0.0-preview.6.24327.6 | 89,687 | 7/9/2024 | |
9.0.0-preview.5.24306.5 | 17,772 | 6/11/2024 | |
9.0.0-preview.4.24267.1 | 9,330 | 5/21/2024 | |
9.0.0-preview.3.24172.9 | 23,641 | 4/11/2024 | |
9.0.0-preview.2.24128.3 | 10,252 | 3/12/2024 | |
9.0.0-preview.1.24081.2 | 20,355 | 2/13/2024 | |
8.0.11 | 45,998 | 11/12/2024 | |
8.0.10 | 1,101,790 | 10/8/2024 | |
8.0.8 | 2,390,583 | 8/13/2024 | |
8.0.7 | 1,916,859 | 7/9/2024 | |
8.0.6 | 2,432,322 | 5/28/2024 | |
8.0.5 | 831,350 | 5/14/2024 | |
8.0.4 | 2,550,185 | 4/9/2024 | |
8.0.3 | 1,613,305 | 3/12/2024 | |
8.0.2 | 2,210,361 | 2/13/2024 | |
8.0.1 | 2,922,354 | 1/9/2024 | |
8.0.0 | 7,356,442 | 11/14/2023 | |
8.0.0-rc.2.23479.14 | 68,042 | 10/10/2023 | |
8.0.0-rc.1.23419.5 | 24,322 | 9/12/2023 | |
8.0.0-preview.7.23375.5 | 66,886 | 8/8/2023 | |
8.0.0-preview.6.23329.4 | 534 | 8/8/2023 | |
8.0.0-preview.5.23280.5 | 41,330 | 6/23/2023 | |
8.0.0-preview.4.23259.4 | 7,016 | 6/23/2023 | |
8.0.0-preview.2.23128.3 | 95,359 | 3/14/2023 | |
8.0.0-preview.1.23110.8 | 72,777 | 2/21/2023 | |
7.0.0 | 86,823,154 | 11/7/2022 | |
7.0.0-rc.2.22472.3 | 167,861 | 10/11/2022 | |
7.0.0-rc.1.22426.10 | 154,833 | 9/14/2022 | |
7.0.0-preview.7.22375.6 | 55,316 | 8/9/2022 | |
7.0.0-preview.6.22324.4 | 70,186 | 7/12/2022 | |
7.0.0-preview.5.22301.12 | 42,326 | 6/14/2022 | |
7.0.0-preview.4.22229.4 | 41,322 | 5/10/2022 | |
7.0.0-preview.3.22175.4 | 83,850 | 4/13/2022 | |
7.0.0-preview.2.22152.2 | 43,243 | 3/14/2022 | |
7.0.0-preview.1.22076.8 | 36,098 | 2/17/2022 | |
6.0.0 | 318,604,565 | 11/8/2021 | |
6.0.0-rc.2.21480.5 | 82,697 | 10/12/2021 | |
6.0.0-rc.1.21451.13 | 91,706 | 9/14/2021 | |
6.0.0-preview.7.21377.19 | 670,074 | 8/10/2021 | |
6.0.0-preview.6.21352.12 | 92,906 | 7/14/2021 | |
6.0.0-preview.5.21301.5 | 83,428 | 6/15/2021 | |
6.0.0-preview.4.21253.7 | 73,002 | 5/24/2021 | |
6.0.0-preview.3.21201.4 | 202,739 | 4/8/2021 | |
6.0.0-preview.2.21154.6 | 91,956 | 3/11/2021 | |
6.0.0-preview.1.21102.12 | 167,218 | 2/12/2021 | |
5.0.3 | 19,440,436 | 11/7/2021 | |
5.0.2 | 31,792,864 | 3/9/2021 | |
5.0.1 | 3,549,801 | 2/9/2021 | |
5.0.0 | 336,857,783 | 11/9/2020 | |
5.0.0-rc.2.20475.5 | 137,060 | 10/13/2020 | |
5.0.0-rc.1.20451.14 | 124,323 | 9/14/2020 | |
5.0.0-preview.8.20407.11 | 191,253 | 8/25/2020 | |
5.0.0-preview.7.20364.11 | 137,685 | 7/21/2020 | |
5.0.0-preview.6.20305.6 | 118,556 | 6/25/2020 | |
5.0.0-preview.5.20278.1 | 37,694 | 6/10/2020 | |
5.0.0-preview.4.20251.6 | 136,572 | 5/18/2020 | |
5.0.0-preview.3.20214.6 | 79,056 | 4/23/2020 | |
5.0.0-preview.2.20160.6 | 83,336 | 4/2/2020 | |
5.0.0-preview.1.20120.5 | 50,184 | 3/16/2020 | |
4.7.3 | 4,948,918 | 11/7/2021 | |
4.7.2 | 36,125,074 | 2/9/2021 | |
4.7.1 | 4,467,556 | 11/9/2020 | |
4.7.0 | 553,490,879 | 12/3/2019 | |
4.7.0-preview3.19551.4 | 59,189 | 11/13/2019 | |
4.7.0-preview2.19523.17 | 29,557 | 11/1/2019 | |
4.7.0-preview1.19504.10 | 32,907 | 10/15/2019 | |
4.6.2 | 48,220 | 1/14/2020 | |
4.6.1 | 2,284,187 | 11/18/2019 | |
4.6.0 | 60,035,785 | 9/23/2019 | |
4.6.0-rc1.19456.4 | 78,832 | 9/16/2019 | |
4.6.0-preview9.19421.4 | 28,855 | 9/4/2019 | |
4.6.0-preview9.19416.11 | 1,061 | 9/4/2019 | |
4.6.0-preview8.19405.3 | 294,172 | 8/13/2019 | |
4.6.0-preview7.19362.9 | 88,078 | 7/23/2019 | |
4.6.0-preview6.19303.8 | 12,434,408 | 6/12/2019 | |
4.6.0-preview6.19264.9 | 1,044 | 9/4/2019 | |
4.6.0-preview5.19224.8 | 159,190 | 5/6/2019 | |
4.6.0-preview4.19212.13 | 21,955 | 4/18/2019 | |
4.6.0-preview3.19128.7 | 320,170 | 3/6/2019 | |
4.6.0-preview.19073.11 | 54,416 | 1/29/2019 | |
4.6.0-preview.18571.3 | 103,028 | 12/3/2018 | |
4.5.2 | 65,496 | 2/9/2021 | |
4.5.1 | 50,504,099 | 10/1/2018 | |
4.5.0 | 100,191,611 | 5/29/2018 | |
4.5.0-rc1 | 174,448 | 5/6/2018 | |
4.5.0-preview2-26406-04 | 814,370 | 4/10/2018 | |
4.5.0-preview1-26216-02 | 1,338,382 | 2/26/2018 | |
4.5.0-preview1-25914-04 | 12,662,824 | 11/15/2017 | |
4.5.0-preview1-25718-03 | 62,481 | 9/19/2017 |