{"id":15011643,"url":"https://github.com/iron-software/ironsoftware.system.drawing","last_synced_at":"2026-03-17T09:04:10.700Z","repository":{"id":58773518,"uuid":"498619300","full_name":"iron-software/IronSoftware.System.Drawing","owner":"iron-software","description":"An open-source System.Drawing.Common replacement for .NET 5 and above on all platforms.  Bringing together System.Drawing, Maui, and ImageSharp's Bitmap, Image, Font, and Shape types via an agnostic free NuGet package.","archived":false,"fork":false,"pushed_at":"2025-03-13T03:01:37.000Z","size":63234,"stargazers_count":131,"open_issues_count":6,"forks_count":19,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2025-04-05T01:04:36.728Z","etag":null,"topics":["dotnet","dotnet-core","drawing","font","image","image-processing","linux","macos","mobile","nuget-package","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iron-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":null}},"created_at":"2022-06-01T06:36:21.000Z","updated_at":"2025-03-28T04:01:21.000Z","dependencies_parsed_at":"2023-07-22T07:15:43.055Z","dependency_job_id":"c659774a-3f71-438a-bf9a-b1b6b248993c","html_url":"https://github.com/iron-software/IronSoftware.System.Drawing","commit_stats":{"total_commits":432,"total_committers":15,"mean_commits":28.8,"dds":"0.25462962962962965","last_synced_commit":"20aec1e057729d9022454cb8e7d5e0d1efceb374"},"previous_names":["iron-software/ironsoftware.drawing.common"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iron-software%2FIronSoftware.System.Drawing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iron-software%2FIronSoftware.System.Drawing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iron-software%2FIronSoftware.System.Drawing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iron-software%2FIronSoftware.System.Drawing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iron-software","download_url":"https://codeload.github.com/iron-software/IronSoftware.System.Drawing/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271522,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","dotnet-core","drawing","font","image","image-processing","linux","macos","mobile","nuget-package","windows"],"created_at":"2024-09-24T19:41:23.092Z","updated_at":"2026-03-17T09:04:10.688Z","avatar_url":"https://github.com/iron-software.png","language":"C#","readme":"[![NuGet](https://img.shields.io/nuget/v/IronSoftware.System.Drawing?color=informational\u0026label=latest\u0026logo=nuget)](https://www.nuget.org/packages/IronSoftware.System.Drawing/) [![Installs](https://img.shields.io/nuget/dt/IronSoftware.System.Drawing?color=informational\u0026label=installs\u0026logo=nuget)](https://www.nuget.org/packages/IronSoftware.System.Drawing/) [![GitHub Latest Commit](https://img.shields.io/github/last-commit/iron-software/IronSoftware.Drawing.Common?color=informational\u0026logo=github)](https://github.com/iron-software/IronSoftware.Drawing.Common) [![GitHub Contributors](https://img.shields.io/github/contributors/iron-software/IronSoftware.Drawing.Common?color=informational\u0026logo=github)](https://github.com/iron-software/IronSoftware.Drawing.Common)\r\n\r\n# IronSoftware.Drawing - Image, Color, Rectangle, and Font class for .NET Applications\r\n\r\n**IronSoftware.Drawing** is an open-source library originally developed by Iron Software that helps C# Software Engineers to replace System.Drawing.Common in .NET projects.\r\n\r\n## Table of Contents\r\n\r\n- [Features](#ironsoftwaredrawing-features)\r\n  - [Compatibility](#ironsoftwaredrawing-has-cross-platform-support-compatibility-with)\r\n- [Using IronSoftware.Drawing](#using-ironsoftwaredrawing)\r\n  - [AnyBitmap Example](#anybitmap-code-example)\r\n  - [Color Example](#color-code-example)\r\n  - [Rectangle Example](#rectangle-code-example)\r\n  - [Size Example](#size-code-example)\r\n  - [Font Example](#font-code-example)\r\n- [Support](#support-available)\r\n\r\n## IronSoftware.Drawing Features:\r\n- **AnyBitmap**: A universally compatible Bitmap class. Implicit casting between `IronSoftware.Drawing.AnyBitmap` and following popular Bitmap/Image formats supported:\r\n\r\n| **Implicit Casting Support** | To `AnyBitmap` Supported | From `AnyBitmap` Supported |\r\n|------------------------------------------------------------------------|:--------------------------:|:----------------------------:|\r\n|                           `System.Drawing.Bitmap`                          |              ✅             |               ✅              |\r\n|                           `System.Drawing.Image`                           |              ✅             |               ✅              |\r\n|                            `SkiaSharp.SKBitmap`                            |              ✅             |               ✅              |\r\n|                             `SkiaSharp.SKImage`                            |              ✅             |               ✅              |\r\n|                           `SixLabors.ImageSharp`                           |              ✅             |               ✅              |\r\n|              `Microsoft.Maui.Graphics.Platform.PlatformImage`              |              ✅             |               ✅              |\r\n\r\n- **Color**: A universally compatible Color class. Implicit casting between `IronSoftware.Drawing.Color` and following popular Color formats supported:\r\n\r\n|     **Implicit Casting Support**    | To `Color` Supported | From `Color` Supported |\r\n|-----------------------------------|:--------------------:|:----------------------:|\r\n|         `SkiaSharp.SKColor`         |           ✅          |            ✅           |\r\n|     `SixLabors.ImageSharp.Color`    |           ✅          |            ✅           |\r\n| `SixLabors.ImageSharp.PixelFormats` |           ✅          |            ✅           |\r\n  \r\n- **Rectangle**: A universally compatible Rectangle class. Implicit casting between `IronSoftware.Drawing.Rectangle` and following popular Rectangle formats supported:\r\n\r\n|   **Implicit Casting Support**   | To `Rectangle` Supported | From `Rectangle` Supported | To `RectangleF` Supported | From `RectangleF` Supported |\r\n|--------------------------------|:----------------------------:|:------------------------------:|:----------------------------:|:------------------------------:|\r\n|    `System.Drawing.Rectangle`    |               ✅              |                ✅               |                               |                                |\r\n|    `System.Drawing.RectangleF`   |                               |                                 |               ✅              |                ✅               |\r\n|        `SkiaSharp.SKRect`        |                               |                                 |               ✅              |                ✅               |\r\n|        `SkiaSharp.SKRectI`       |               ✅              |                ✅               |                               |                                |\r\n| `SixLabors.ImageSharp.Rectangle` |               ✅              |                ✅               |                               |                                |\r\n| `SixLabors.ImageSharp.RectangleF` |                               |                                 |               ✅              |                ✅               |\r\n\r\n- **Size**: A universally compatible Size class. Implicit casting between `IronSoftware.Drawing.Size` and following popular Size formats supported:\r\n\r\n|   **Implicit Casting Support**   | To `Size` Supported | From `Size` Supported | To `SizeF` Supported | From `SizeF` Supported |\r\n|--------------------------------|:----------------------------:|:------------------------------:|:----------------------------:|:------------------------------:|\r\n|    `System.Drawing.Size`    |               ✅              |                ✅               |                              |                                |\r\n|    `System.Drawing.SizeF`   |                               |                                |               ✅              |                ✅               |\r\n|        `SkiaSharp.SKSize`        |                               |                                 |               ✅              |                ✅               |\r\n|        `SkiaSharp.SKSizeI`       |               ✅              |                ✅               |                               |                                 |\r\n| `SixLabors.ImageSharp.Size` |               ✅              |                ✅               |                              |                                |\r\n| `SixLabors.ImageSharp.SizeF` |                               |                                 |               ✅              |                ✅               |\r\n| `Microsoft.Maui.Graphics.Size` |               ✅              |                ✅               |                              |                                |\r\n| `Microsoft.Maui.Graphics.SizeF` |                               |                                 |               ✅              |                ✅               |\r\n\r\n- **Font**: A universally compatible Font class. Implicit casting between `IronSoftware.Drawing.Font` and following popular Font formats supported:\r\n\r\n| **Implicit Casting Support** | To `Font` Supported | From `Font` Supported |\r\n|----------------------------|:-------------------:|:---------------------:|\r\n|     `System.Drawing.Font`    |          ✅          |           ✅           |\r\n|      `SkiaSharp.SKFont`      |          ✅          |           ✅           |\r\n|    `SixLabors.Fonts.Font`    |          ✅          |           ✅           |\r\n\r\n- **Point** and **PointF**: Universally compatible Point and PointF classes. Implicit casting between `IronSoftware.Drawing.Point` and `IronSoftware.Drawing.PointF` and the following supported:\r\n\r\n|   **Implicit Casting Support**   | To `Point` Supported | From `Point` Supported | To `PointF` Supported | From `PointF` Supported |\r\n|--------------------------------|:----------------------------:|:------------------------------:|:----------------------------:|:------------------------------:|\r\n| `System.Drawing.Point`            |               ✅              |                ✅               |                              |                                |\r\n| `System.Drawing.PointF`           |               ✅              |                ✅               |                              |                                |\r\n| `SixLabors.ImageSharp.Point`      |               ✅              |                ✅               |                              |                                |\r\n| `SixLabors.ImageSharp.PointF`     |                              |                                |               ✅              |                ✅               |\r\n| `Microsoft.Maui.Graphics.Point`   |               ✅              |                ✅               |                              |                                |\r\n| `Microsoft.Maui.Graphics.PointF`  |                              |                                |               ✅              |                ✅               |\r\n| `SkiaSharp.SKPoint`               |                              |                                |               ✅              |                ✅               |\r\n| `SkiaSharp.SKPointI`              |               ✅              |                ✅               |                              |                                |\r\n\r\n### IronSoftware.Drawing has cross platform support compatibility with:\r\n- .NET 9, .NET 8, .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework\r\n- Windows, macOS, Linux, Docker, Azure, and AWS\r\n\r\n## Using IronSoftware.Drawing\r\n\r\nInstalling the IronSoftware.Drawing NuGet package is quick and easy, please install the package like this:\r\n```\r\nPM\u003e Install-Package IronSoftware.System.Drawing\r\n```\r\nAlternatively, download directly from the [official NuGet website](https://www.nuget.org/packages/IronSoftware.System.Drawing).\r\n\r\n\r\nOnce installed, you can get started by adding `using IronSoftware.Drawing;` to the top of your C# code.\r\n### `AnyBitmap` Code Example\r\n```csharp\r\nusing IronSoftware.Drawing;\r\n\r\n// Create a new AnyBitmap object\r\nvar bitmap = AnyBitmap.FromFile(\"FILE_PATH\");\r\nbitmap.SaveAs(\"result.jpg\");\r\n\r\nvar bytes = bitmap.ExportBytes();\r\n\r\nvar resultExport = new System.IO.MemoryStream();\r\nbitmap.ExportStream(resultExport, AnyBitmap.ImageFormat.Jpeg, 100);\r\n\r\n// Casting between System.Drawing.Bitmap and IronSoftware.Drawing.AnyBitmap\r\nSystem.Drawing.Bitmap image = new System.Drawing.Bitmap(\"FILE_PATH\");\r\nIronSoftware.Drawing.AnyBitmap anyBitmap = image;\r\nanyBitmap.SaveAs(\"result-from-casting.png\");\r\n\r\n\r\n// Creates a Multi-page Tiff-style AnyBitmap from an Image array\r\nList\u003cAnyBitmap\u003e bitmaps = new List\u003cAnyBitmap\u003e()\r\n{\r\n    AnyBitmap.FromFile(\"FILE_PATH_1\"),\r\n    AnyBitmap.FromFile(\"FILE_PATH_2\")\r\n};\r\nAnyBitmap anyBitmap = AnyBitmap.CreateMultiFrameTiff(bitmaps);\r\n\r\n// Creates a Multi-page Tiff-style AnyBitmap from a fully qualified file path array\r\nList\u003cstring\u003e imagePaths = new List\u003cstring\u003e()\r\n{\r\n    \"FILE_PATH_1\",\r\n    \"FILE_PATH_2\"\r\n};\r\nAnyBitmap anyBitmap = AnyBitmap.CreateMultiFrameTiff(imagePaths);\r\n\r\n// Manipulate image frames\r\nint frameCount = anyBitmap.FrameCount;\r\nList\u003cAnyBitmap\u003e frames = (List\u003cAnyBitmap\u003e)anyBitmap.GetAllFrames;\r\n```\r\n### `Color` Code Example\r\n```csharp\r\nusing IronSoftware.Drawing;\r\n\r\n// Create a new Color object\r\nColor fromHex = new Color(\"#191919\");\r\nColor fromRgb = new Color(255, 255, 0);\r\nColor fromEnum = Color.Crimson;\r\n\r\n// Casting between System.Drawing.Color and IronSoftware.Drawing.Color\r\nSystem.Drawing.Color drawingColor = System.Drawing.Color.Red;\r\nIronSoftware.Drawing.Color ironColor = drawingColor;\r\n\r\nironColor.A;\r\nironColor.R;\r\nironColor.G;\r\nironColor.B;\r\n\r\n// Luminance is a value from 0 (black) to 100 (white) where 50 is the perceptual \"middle grey\"\r\nironColor.GetLuminance();\r\n\r\n// Gets the 32-bit ARGB value of this Color structure.\r\nironColor.ToArgb();\r\n```\r\n### `Rectangle` Code Example\r\n```csharp\r\nusing IronSoftware.Drawing;\r\n\r\n// Create a new Rectangle object\r\nRectangle rectangle = new Rectangle(5, 5, 50, 50);\r\n\r\n// Create a new Rectangle object with MeasurementUnits\r\nRectangle mmRectangle = new Rectangle(5, 5, 50, 50, MeasurementUnits.Millimeters);\r\n\r\n// Convert between MeasurementUnits\r\nRectangle pxRectangle = mmRectangle.ConvertTo(MeasurementUnits.Millimeters);\r\n// Or specify DPI\r\nRectangle pxRectangleWithDPI = mmRectangle.ConvertTo(MeasurementUnits.Millimeters, 200);\r\n\r\n// Casting between System.Drawing.Rectangle and IronSoftware.Drawing.Rectangle\r\nSystem.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(10, 10, 150, 150);\r\nIronSoftware.Drawing.Rectangle ironRectangle = rectangle;\r\n\r\nironRectangle.X;\r\nironRectangle.Y;\r\nironRectangle.Width;\r\nironRectangle.Height;\r\n```\r\n### `Size` Code Example\r\n```csharp\r\nusing IronSoftware.Drawing;\r\n\r\n// Create a new Size object\r\nSize size = new Size(50, 50);\r\n\r\n// Casting between System.Drawing.Size and IronSoftware.Drawing.Size\r\nSystem.Drawing.Size systemSize = new System.Drawing.Size(150, 150);\r\nIronSoftware.Drawing.Size ironSize = systemSize;\r\n\r\nironSize.Width;\r\nironSize.Height;\r\n```\r\n### `Font` Code Example\r\n```csharp\r\nusing IronSoftware.Drawing;\r\n\r\n// Create a new Font object\r\nFont font = new Font(\"Times New Roman\", FontStyle.Italic | FontStyle.Bold, 30);\r\n\r\n// Casting between System.Drawing.Font and IronSoftware.Drawing.Font\r\nSystem.Drawing.Font drawingFont = new System.Drawing.Font(\"Courier New\", 30);\r\nIronSoftware.Drawing.Font ironFont = drawingFont;\r\n\r\nironFont.FamilyName;\r\nironFont.Style;\r\nironFont.Size;\r\nironFont.Italic;\r\nironFont.Bold;\r\n```\r\n\r\n## Support Available\r\n\r\nFor more information about Iron Software please visit our website: [https://ironsoftware.com/](https://ironsoftware.com/)\r\n\r\nFor general support and technical inquiries, please email us at: support@ironsoftware.com\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firon-software%2Fironsoftware.system.drawing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firon-software%2Fironsoftware.system.drawing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firon-software%2Fironsoftware.system.drawing/lists"}