iron-software / IronSoftware.System.Drawing

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.
Other
114 stars 18 forks source link

Iron 608 function for ironocr #21

Closed mee-ironsoftware closed 1 year ago

mee-ironsoftware commented 1 year ago

AnyBitmap

Bug Fixed

Functional Added

Image manipulated

// Create multiple page Tiff image by Array of fully qualified file path List imagePaths = new List(); AnyBitmap anyBitmap = AnyBitmap.CreateMultiFrameTiff(imagePaths);

int frameCount = anyBitmap.FrameCount; List frames = anyBitmap.GetAllFrames;

- ` AnyBitmap.CreateMultiFrameGif(IEnumerable<AnyBitmap>)` to Creates a multi-frame GIF image from multiple AnyBitmaps.

// Create multiple page Gif image by Array of AnyBitmap List bitmaps = new List(); AnyBitmap anyBitmap = AnyBitmap.CreateMultiFrameGif(bitmaps);

// Create multiple page Gif image by Array of fully qualified file path List imagePaths = new List(); AnyBitmap anyBitmap = AnyBitmap.CreateMultiFrameGif(imagePaths); int frameCount = anyBitmap.FrameCount; List frames = anyBitmap.GetAllFrames;


# Color
## Bug Fixed
- Add missing XML comment of the class
- Modify XML comment

## Functional Added
- `Color.ToArgb` to Gets the 32-bit ARGB value of this Color structure.

IronSoftware.Drawing.Color ironColor = IronSoftware.Drawing.Color.Azure; int argb = ironColor.ToArgb();


# CropRectangle
## Bug Fixed
- Add missing XML comment of the class
- Modify XML comment

## Functional Added
- CropRectangle.Units to specify Unit of measurement. (Pixels, Millimeters)
- CropRectangle can convert between Pixels and Millimeters

int useDPI = 96; CropRectangle pxRect = new CropRectangle(0, 0, 150, 150, MeasurementUnits.Pixels); CropRectangle mmRect = pxRect.ConvertTo(MeasurementUnits.Millimeters, useDPI);