You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

irondrawing

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

irondrawing

2022.9.8691
unpublished
nugetNuGet
Maintainers
0
Source

Nuget Installs Passed windows macOS linux docker aws microsoftazure

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

Keywords

Images

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts