IronDrawing 2022.9.8691
dotnet add package IronDrawing --version 2022.9.8691
NuGet\Install-Package IronDrawing -Version 2022.9.8691
<PackageReference Include="IronDrawing" Version="2022.9.8691" />
paket add IronDrawing --version 2022.9.8691
#r "nuget: IronDrawing, 2022.9.8691"
// Install IronDrawing as a Cake Addin
#addin nuget:?package=IronDrawing&version=2022.9.8691
// Install IronDrawing as a Cake Tool
#tool nuget:?package=IronDrawing&version=2022.9.8691
IronDrawing - Image, Color, Rectangle, and Font class for .NET Applications
IronDrawing is a library developed and maintained by Iron Software that helps C# Software Engineers to replace System.Drawing.Common in .NET projects.
IronDrawing Features and Capabilities:
- AnyBitmap: A universally compatible Bitmap class. Implicit casting between
IronDrawing.AnyBitmap
and the following:System.Drawing.Bitmap
System.Drawing.Image
SkiaSharp.SKBitmap
SkiaSharp.SKImage
SixLabors.ImageSharp
Microsoft.Maui.Graphics.Platform.PlatformImage
- Color: A universally compatible Color class. Implicit casting between
IronDrawing.Color
and the following:System.Drawing.Color
SkiaSharp.SKColor
SixLabors.ImageSharp.Color
SixLabors.ImageSharp.PixelFormats
- CropRectangle: A universally compatible Rectangle class. Implicit casting between
IronDrawing.CropRectangle
and the following:System.Drawing.Rectangle
SkiaSharp.SKRect
SkiaSharp.SKRectI
SixLabors.ImageSharp.Rectangle
- Font: A universally compatible Font class. Implicit casting between
IronDrawing.Font
and the following:System.Drawing.Font
SkiaSharp.SKFont
SixLabors.Fonts.Font
IronDrawing has cross platform support compatibility with:
- .NET 7, .NET 6, .NET 5, .NET Core, Standard, and Framework
- Windows, macOS, Linux, Docker, Azure, and AWS
Using IronDrawing
Installing the IronDrawing NuGet package is quick and easy, please install the package like this:
PM> Install-Package IronDrawing
Once installed, you can get started by adding using IronDrawing
to the top of your C# code.
AnyBitmap
Code Example
using IronDrawing;
// Create a new AnyBitmap object
var bitmap = AnyBitmap.FromFile("FILE_PATH");
bitmap.SaveAs("result.jpg");
var bytes = bitmap.ExportBytes();
var resultExport = new System.IO.MemoryStream();
bimtap.ExportStream(resultExport, AnyBitmap.ImageFormat.Jpeg, 100);
// Casting between System.Drawing.Bitmap to IronDrawing.AnyBitmap
System.Drawing.Bitmap image = new System.Drawing.Bitmap("FILE_PATH");
var anyBitmap = image;
anyBitmap.SaveAs("result-from-casting.png");
Color
Code Example
using IronDrawing;
// Create a new Color object
Color fromHex = new Color("#191919");
Color fromRgb = new Color(255, 255, 0);
Color fromEnum = Color.Crimson;
// Casting between System.Drawing.Color to IronDrawing.Color
System.Drawing.Color drawingColor = System.Drawing.Color.Red;
IronDrawing.Color ironDrawingColor = drawingColor;
ironDrawingColor.A;
ironDrawingColor.R;
ironDrawingColor.G;
ironDrawingColor.B;
// Luminance is a value from 0 (black) to 100 (white) where 50 is the perceptual "middle grey"
ironDrawingColor.GetLuminance();
CropRectangle
Code Example
using IronDrawing;
// Create a new CropRectangle object
CropRectangle cropRectangle = new CropRectangle(5, 5, 50, 50);
// Casting between System.Drawing.Rectangle to IronDrawing.CropRectangle
System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(10, 10, 150, 150);
CropRectangle ironDrawingCropRectangle = rectangle;
ironDrawingCropRectangle.Width;
ironDrawingCropRectangle.Height;
ironDrawingCropRectangle.X;
ironDrawingCropRectangle.Y;
Font
Code Example
using IronDrawing;
// Create a new Font object
Font font = new Font("Times New Roman", FontStyle.Italic | FontStyle.Bold, 30);
// Casting between System.Drawing.Font to IronDrawing.Font
System.Drawing.Font drawingFont = new System.Drawing.Font("Courier New", 30);
IronDrawing.Font ironDrawingFont = drawingFont;
ironDrawingFont.FamilyName;
ironDrawingFont.Style;
ironDrawingFont.Size;
ironDrawingFont.Italic;
ironDrawingFont.Bold;
Support Available
For more information on Iron Software please visit: https://ironsoftware.com/ For general support and technical inquiries, please email us at: developers@ironsoftware.com
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 was computed. 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. |
.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 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
- SixLabors.ImageSharp.Drawing (>= 1.0.0-beta15)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|
* Added support for implicit casting for existing Color, CropRectangle, and Font with those of Microsoft.Maui
* Added support for implicit casting between Rgb48, Rgba64, and IronDrawing.Color
* Made amendment which solved a dependency issue. As such, .NET Framework is only supported for versions 4.6.1 and above.