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.
AnyBitmap.BitsPerPixel to Gets colors depth, in number of bits per pixel.
AnyBitmap bitmap = AnyBitmap.FromFile("file");
int bpp = bitmap.BitsPerPixel;
Tiff image manipulated
AnyBitmap.FrameCount to Gets the number of frames in our loaded Image. Each “frame” is a page of an image such as Tiff or Gif. All other image formats return 1.
AnyBitmap bitmap = AnyBitmap.FromFile("tiff-image-file");
int frameCount = bitmap.FrameCount;
AnyBitmap.GetAllFrames to Gets all of the cloned frames in our loaded Image. Each "frame" is a page of an image such as Tiff or Gif. All other image formats return an IEnumerable of length 1.
This will create image that has more than 1 page. If the dimension is different will set all images to the largest dimension.
AnyBitmap.CreateMultiFrameTiff(IEnumerable<AnyBitmap>) to Creates a multi-frame TIFF image from multiple AnyBitmaps.
// Create multiple page Tiff image by Array of AnyBitmap
List<AnyBitmap> bitmaps = new List<AnyBitmap>();
AnyBitmap anyBitmap = AnyBitmap.CreateMultiFrameTiff(bitmaps);
// 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);
AnyBitmap
Bug Fixed
Functional Added
Image manipulated
AnyBitmap.Clone(CropRectangle)
to Clone image with CropRectangleAnyBitmap.BitsPerPixel
to Gets colors depth, in number of bits per pixel.Tiff image manipulated
AnyBitmap.FrameCount
to Gets the number of frames in our loaded Image. Each “frame” is a page of an image such as Tiff or Gif. All other image formats return 1.AnyBitmap.GetAllFrames
to Gets all of the cloned frames in our loaded Image. Each "frame" is a page of an image such as Tiff or Gif. All other image formats return an IEnumerable of length 1.Create multiple page image
AnyBitmap.CreateMultiFrameTiff(IEnumerable<AnyBitmap>)
to Creates a multi-frame TIFF image from multiple AnyBitmaps.// 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;
// 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;
IronSoftware.Drawing.Color ironColor = IronSoftware.Drawing.Color.Azure; int argb = ironColor.ToArgb();
int useDPI = 96; CropRectangle pxRect = new CropRectangle(0, 0, 150, 150, MeasurementUnits.Pixels); CropRectangle mmRect = pxRect.ConvertTo(MeasurementUnits.Millimeters, useDPI);