System.Drawing.Common 9.0.10
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 |
|---|---|
|
Microsoft.CodeAnalysis.Workspaces.MSBuild
.NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
of the following packages to add the appropriate language support:
- Microsoft.CodeAnalysis.CSharp.Workspaces
- Microsoft.CodeAnalysis.VisualBasic.Workspaces
More details at https://aka.ms/roslyn-packages
This package was built from the source at https://github.com/dotnet/roslyn/commit/fa72fa61b0d822ea8a3fbeb96f668340419ab5cd.
|
19 |
|
Aspose.Cells
A powerful and fast library written in C# for manipulating and converting Excel(XLS, XLSX,XLSB), ODS, CSV,JSON and HTML files.
|
16 |
|
Spire.Presentation
Spire.Presentation for .NET is a professional PowerPoint® compatible component that enables developers to create, read, write, and modify PowerPoint® documents from any .NET(C#, VB.NET, ASP.NET) platform, NET Core 2.0. .netstand2.0. As an independent PowerPoint .NET component, Spire.Presentation for .NET doesn't need Microsoft PowerPoint installed on the machine.
Spire.Presentation for .NET support PPT, PPS, PPTX and PPSX presentation formats. It provides functions such as managing text, image, shapes, tables, animations, audio and video on slides. It also support exporting presentation slides to EMF, JPG, PDF, XPS, SVG, HTML aand images etc.
A powerpoint component which enables developers to to create, read, write, and modify PowerPoint documents on .NET4.0, .NET6.0, .NET7.0, NETCore,NETStandard,MonoAndroid, Xamarin.
|
14 |
|
System.Windows.Extensions
Provides miscellaneous Windows-specific types
Commonly Used Types:
System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Security.Cryptography.X509Certificates.X509SelectionFlag
|
13 |
|
Spire.PDF
Spire.PDF for .NET is a versatile PDF library that enables software developers to generate, edit, read and manipulate PDF files within their own .NET applications. As a standalone PDF component, Spire.PDF for .NET provides users an incredible wealth of features without installing Adobe Acrobat. This component is completely written in C#, but also supports VB.NET, Windows Forms and ASP.NET.
With the Spire.PDF for .NET API, you can get the ability to read PDF text and image even attachments with high efficiency. Even the special content such as language written from right to left can be extracted such as Herbrew and Arabic. Other basic features such as text, image, table, shapes, hyperlinks, bookmark, headings, footnotes, lists, form fields, pagination, booklet barcode, attachments, transparency, annotations, actions, overlay etc all work great for users. As for security, Spire.PDF for .NET enables you to protect your PDF files by passwords and digital signature. Spire.PDF now supprots to work on .NET core, MonoAndroid and Xamarin.iOS platforms.
|
13 |
|
Spire.Presentation
Spire.Presentation for .NET is a professional PowerPoint® compatible component that enables developers to create, read, write, and modify PowerPoint® documents from any .NET(C#, VB.NET, ASP.NET) platform, NET Core 2.0. .netstand2.0. As an independent PowerPoint .NET component, Spire.Presentation for .NET doesn't need Microsoft PowerPoint installed on the machine.
Spire.Presentation for .NET support PPT, PPS, PPTX and PPSX presentation formats. It provides functions such as managing text, image, shapes, tables, animations, audio and video on slides. It also support exporting presentation slides to EMF, JPG, PDF, XPS, SVG, HTML aand images etc.
|
13 |
|
Spire.PDF
Spire.PDF for .NET is a versatile PDF library that enables software developers to generate, edit, read and manipulate PDF files within their own .NET applications. As a standalone PDF component, Spire.PDF for .NET provides users an incredible wealth of features without installing Adobe Acrobat. This component is completely written in C#, but also supports VB.NET, Windows Forms and ASP.NET.
With the Spire.PDF for .NET API, you can get the ability to read PDF text and image even attachments with high efficiency. Even the special content such as language written from right to left can be extracted such as Herbrew and Arabic. Other basic features such as text, image, table, shapes, hyperlinks, bookmark, headings, footnotes, lists, form fields, pagination, booklet barcode, attachments, transparency, annotations, actions, overlay etc all work great for users. As for security, Spire.PDF for .NET enables you to protect your PDF files by passwords and digital signature. Spire.PDF now supprots to work on .NET core, MonoAndroid and Xamarin.iOS platforms.
|
12 |
|
Magicodes.IE.Core
导入导出通用库,通过导入导出DTO模型来控制导入和导出,支持Excel、Word、Csv、Pdf和Html以及动态导出。
开源库地址:https://github.com/xin-lai
博客地址:http://www.cnblogs.com/codelove/
交流QQ群:85318032
**2020.09.14**
- 【Nuget】版本更新到2.4.0-beta1
1、支持单元格导出宽度设置
2、Excel导出支持对Enum的ValueMapping设置
3、Excel导出支持对bool类型的ValueMapping设置
|
12 |
|
Magicodes.IE.EPPlus
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
导入导出通用库,支持Dto导入导出、模板导出、花式导出以及动态导出,支持Excel、Csv、Word、Pdf和Html。
开源库地址:https://github.com/xin-lai
博客地址:http://www.cnblogs.com/codelove/
更新记录:https://github.com/dotnetcore/Magicodes.IE/blob/master/RELEASE.md
公众号:麦扣聊技术
交流QQ群:85318032
**2022.03.06**
- 完善筛选器注册机制,在指定了特性ImportHeaderFilter、ExporterHeaderFilter等值后,筛选器将匹配对于的类型,如不指定则作为全局筛选器。
**2022.03.02**
- Excel导入时增加回调函数,方便增加自定义验证
- 优化获取DisplayName的逻辑
- 导出CSV支持ColumnIndex
- 优化Pdf导出逻辑,统一各平台导出代码
**2021.11.28**
- 修复未及时回收问题
**2021.11.28**
- 添加两个动态验证特性(见PR[#319 by Afonsof91](https://github.com/dotnetcore/Magicodes.IE/pull/359)),DynamicStringLengthAttribute及RequiredIfAttribute
- CSV添加对分隔符的配置,具体见PR[#319 by Afonsof91](https://github.com/dotnetcore/Magicodes.IE/pull/319)
- Excel导入添加对`TimeSpan`类型的支持,使用参考`TimeSpan_Test`
- 初步添加对.NET6的适配
**2021.10.23**
- 导出日期格式化支持'DateTimeOffset'类型,具体见PR[#349](https://github.com/dotnetcore/Magicodes.IE/pull/349),感谢[YaChengMu](https://github.com/YaChengMu)
- 修改Magicodes.IE.EPPlus的包依赖PR[#351](https://github.com/dotnetcore/Magicodes.IE/pull/351)
|
12 |
|
Magicodes.EPPlus
Create advanced Excel spreadsheets using .NET
|
12 |
|
ClosedXML
ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.
|
12 |
|
EPPlus
A spreadsheet library for .NET framework and .NET core
|
11 |
|
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.
|
11 |
|
Spire.PDF
Spire.PDF for .NET is a versatile PDF library that enables software developers to generate, edit, read and manipulate PDF files within their own .NET applications. As a standalone PDF component, Spire.PDF for .NET provides users an incredible wealth of features without installing Adobe Acrobat. This component is completely written in C#, but also supports VB.NET, Windows Forms and ASP.NET.
With the Spire.PDF for .NET API, you can get the ability to read PDF text and image even attachments with high efficiency. Even the special content such as language written from right to left can be extracted such as Herbrew and Arabic. Other basic features such as text, image, table, shapes, hyperlinks, bookmark, headings, footnotes, lists, form fields, pagination, booklet barcode, attachments, transparency, annotations, actions, overlay etc all work great for users. As for security, Spire.PDF for .NET enables you to protect your PDF files by passwords and digital signature. Spire.PDF now supprots to work on .NET core, MonoAndroid and Xamarin.iOS platforms.
|
11 |
|
Magicodes.IE.Core
导入导出通用库,通过导入导出DTO模型来控制导入和导出,支持Excel、Word、Csv、Pdf和Html以及动态导出。
开源库地址:https://github.com/xin-lai
博客地址:http://www.cnblogs.com/codelove/
交流QQ群:85318032
**2020.06.07**
- ** 【Nuget】版本更新到2.2.4**
- ** 【Excel导入】增加`导入失败`仅返回错误行功能**
- ** 【Excel导入】修复导入的空行标注位置偏移**
- ** 【Excel导出】增加`SeparateByColumn`进行分割追加列**
**2020.05.31**
- **【Nuget】版本更新到2.2.3**
- **【Excel导入】增加了stream Csv导入扩展方法
- **【Word导出】修复word文件字节导出错误
**2020.05.24**
- **【Nuget】版本更新到2.2.2**
- **【Excel导入】增加了stream导入扩展方法
- **【Excel导出】增加了内容居中(单列居中、整表居中)
- **【导出】对一些中间件代码进行了修复及优化
|
11 |
|
Magicodes.IE.Core
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
导入导出通用库,支持Dto导入导出、模板导出、花式导出以及动态导出,支持Excel、Csv、Word、Pdf和Html。
开源库地址:https://github.com/xin-lai
博客地址:http://www.cnblogs.com/codelove/
公众号:麦扣聊技术
交流QQ群:85318032
**2021.07.15**
- Magicodes.EPPlus回退到4.6.3,以修复格式错乱的问题
- 修复Excel仅导出错误数据时的Bug[#302](https://github.com/dotnetcore/Magicodes.IE/pull/302)
- 完善多语言[#298](https://github.com/dotnetcore/Magicodes.IE/pull/298),以及完善单元测试
**2021.07.04**
- 模板导出支持一行多个表格[#296](https://github.com/dotnetcore/Magicodes.IE/issues/296)
**2021.06.29**
- 合并PR[#295](https://github.com/dotnetcore/Magicodes.IE/pull/295),完善模板导出类型定义的问题
**2021.06.25**
- Fix only first [ColumnIndex] is valid exception[#289](https://github.com/dotnetcore/Magicodes.IE/issues/289)
**2021.06.18**
- Update ImportTestColumnIndex_Test
- Magicodes.EPPlus was upgraded to 4.6.7[#285](https://github.com/dotnetcore/Magicodes.IE/issues/285)
**2021.06.05**
- Fix ImporterHeader->ColumnIndex
- Utilize RecyclableMemoryStream instead of "new MemoryStream" all over
**2021.06.05**
- EXCEL模板导出支持XOffset和YOffset
- EXCEL修复ValueMapping
- Core工程多语言配置
- EXCEL优化时间导出
**2021.06.01**
- EXCEL支持自动换行属性
- EXCEL支持隐藏列属性
- EXCEL优化时间优化
|
11 |
.NET Framework 4.6.2
- No dependencies.
.NET 8.0
- Microsoft.Win32.SystemEvents (>= 9.0.10)
.NET 9.0
- Microsoft.Win32.SystemEvents (>= 9.0.10)
.NET Standard 2.0
- No dependencies.