System.Drawing.Common 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
Showing the top 20 packages that depend on System.Drawing.Common.
Packages | Downloads |
---|---|
System.Windows.Extensions
Provides miscellaneous Windows-specific types
Commonly Used Types:
System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Security.Cryptography.X509Certificates.X509SelectionFlag
When using NuGet 3.x this package requires at least version 3.4.
|
98 |
System.Windows.Extensions
Provides miscellaneous Windows-specific types
Commonly Used Types:
System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Security.Cryptography.X509Certificates.X509SelectionFlag
When using NuGet 3.x this package requires at least version 3.4.
|
65 |
FFMpegCore
A .NET Standard FFMpeg/FFProbe wrapper for easily integrating media analysis and conversion into your .NET applications
|
16 |
Selenium.WebDriver
Selenium is a set of different software tools each with a different approach to supporting browser automation. These tools are highly flexible, allowing many options for locating and manipulating elements within a browser, and one of its key features is the support for automating multiple browser platforms. This package contains the .NET bindings for the concise and object-based Selenium WebDriver API, which uses native OS-level events to manipulate the browser, bypassing the JavaScript sandbox, and does not require the Selenium Server to automate the browser.
|
7 |
System.Windows.Extensions
Provides miscellaneous Windows-specific types
Commonly Used Types:
System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Security.Cryptography.X509Certificates.X509SelectionFlag
|
6 |
GleamTech.DocumentUltimate
DocumentUltimate is an ASP.NET Document Viewer and Converter which supports ASP.NET Core 2.0+, ASP.NET MVC 3.0+ and ASP.NET WebForms 4.6.1+ web applications/web sites.
DocumentUltimate can also be used with .NET Core 2.0+ and .NET Framework 4.6.1+ console/desktop applications for conversion between several document formats.
Features:
- Universal web document viewer which works on both desktop and mobile browsers.
- Crystal-clear zooming. High resolution rendering, preserving text and graphics (no rasterization) exactly as they are in the original.
- Fast document loading, the whole document is not loaded at once, document pages are loaded as you are about to view them.
- Search text within document. Navigate with bookmarks/outlines.
- Change page layout modes (e.g. single page or facing pages), rotate pages and view on full screen.
- Print, download original or download as PDF inside the viewer.
- Secure document viewing, copy protection (DRM). Viewed documents are encrypted so they are copy-protected out of the box. Ability to disable downloading the original document or replicating it via printing or selecting and copying text.
- Watermark document pages with text or image. Customize the watermarks with wide range of options e.g. position, size, rotation, opacity, color.
- Pre-higlight keywords in the document, e.g. if you launch the document viewer from a search results page, you can higlight the searched keywords.
- Self-contained conversion engine, no external dependencies, e.g. you don't need to install Microsoft Office on your server.
- Single managed DLL which works both on 32-bit and 64-bit for hassle-free development and deployment.
- Supports being used in desktop or console applications for converting between document formats. Only the document viewer is dependant on web applications.
Supported Formats:
- Portable Formats(.pdf, .xps, .oxps, .xpz)
- Word Processing Formats(.docx, .docm, .dotx, .dotm, .doc, .dot, .rtf, .odt, .ott)
- Spreadsheet Formats(.xlsx, .xlsm, .xltx, .xltm, .xlam, .xlsb, .xls, .xlt, .xml, .csv, .tsv, .dif, .ods, .ots)
- Presentation Formats(.pptx, .pptm, .potx, .potm, .ppsx, .ppsm, .ppt, .pps, .odp, .otp)
- Diagram Formats(.vsdx, .vsdm, .vstx, .vstm, .vssx, .vssm, .vdx, .vsx, .vtx, .vsd, .vss, .vst, .vdw)
- Project Management Formats(.mpp, .mpt, .mpx)
- Email Formats(.msg, .eml, .emlx)
- Ebook Formats(.epub, .mobi)
- Markup Formats(.html, .htm, .mht, .mhtml, .web)
- Text Formats(.txt)
- Cad Formats(.dwg, .dxf)
- Scanner Image Formats(.tif, .tiff, .djvu, .dcm)
- Vector Image Formats(.ps, .svg, .emf, .xaml)
- Raster Image Formats(.psd, .jpg, .jpeg, .jpe, .jfif, .jp2, .jpf, .jpx, .j2k, .j2c, .jpc, .jxr, .wdp, .hdp, .png, .gif, .webp, .bmp, .wmf, .dib)
|
6 |
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.
|
6 |
Appium.WebDriver
Selenium Webdriver extension for Appium.
|
5 |
System.Windows.Extensions
Provides miscellaneous Windows-specific types
Commonly Used Types:
System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Security.Cryptography.X509Certificates.X509SelectionFlag
|
5 |
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.
|
5 |
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0).
This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
|
5 |
System.Windows.Extensions
Provides miscellaneous Windows-specific types
Commonly Used Types:
System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Security.Cryptography.X509Certificates.X509SelectionFlag
When using NuGet 3.x this package requires at least version 3.4.
|
5 |
.NET Framework 4.6.2
- No dependencies.
.NET 8.0
- Microsoft.Win32.SystemEvents (>= 9.0.0)
.NET 9.0
- Microsoft.Win32.SystemEvents (>= 9.0.0)
.NET Standard 2.0
- No dependencies.