GrapeCity Documents for Imaging

GrapeCity Documents for Imaging (GcImaging) is a cross-platform library that allows to create, load, and save raster images.
GcImaging supports several popular image formats including PNG, JPEG, TIFF, BMP and GIF.
It provides powerful text layout, font management and graphics engines that allow to draw high-quality text and graphics on images.
It allows to resize, rotate, and crop images, apply various filters and effects, and convert images between all supported image formats.
GcImaging does not depend on any specific hardware or third-party libraries, and works on all platforms that support .NET Standard 2.0.
The online Documents for Imaging sample browser is available at

Install-Package GrapeCity.Documents.Imaging -Version
dotnet add package GrapeCity.Documents.Imaging --version
<PackageReference Include="GrapeCity.Documents.Imaging" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GrapeCity.Documents.Imaging --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

# Changes from version

## Breakikng Changes
- Removed the following methods from Image class: ToJpegStream(), ToPngStream(), ToGifStream(), FromGcBitmap(), FromFileDeferred(), FromStreamDeferred(), FromBytesDeferred(). Use Image.ToGcBitmap() and then call any of the GcBitmap.SaveAs* methods instead.
- Removed Image.ConvertToGrayscale() method. Use Image.ToGcBitmap() and apply GrayscaleEffect to the GcBitmap instead.
- Replaced Image.AsGcBitmap() method with IImage.ToGcBitmap() interface method (IImage interface is supported in Image and the various bitmap classes).
- Moved the Disposed property from Image class to IImage interface.
- Removed the Clone() method from Image class.
- Removed withICC argument from the following methods of the Image class: FromFile(), FromStream(), FromBytes().
- The new GcBitmap.EnsureRendererCreated() method should be called prior to using GcBitmap.Renderer property to make sure an instance of BitmapRenderer is returned.
- Added frameIndex as the second parameter to constructors of GcBitmap class that accept path, stream, or byte array as the first argument.
- Renamed GcBitmap.AsBilevelBitmap to ToBilevelBitmap (the transparencyMask parameter replaced with the colorChannel parameter, blackIsZero replaced with whiteIsZero with  opposite meaning and default value).
- Renamed GcBitmap.AsGrayscaleBitmap to ToGrayscaleBitmap (the transparencyMask parameter replaced with the colorChannel parameter, blackIsZero replaced with whiteIsZero with opposite meaning and default value).
- Replaced BlackIsZero property in BilevelBitmap and GrayscaleBitmap replaced with WhiteIsZero property with opposite meaning.
- Replaced blackIsZero parameter of BilevelBitmap and GrayscaleBitmap constructors with whiteIsZero parameter with opposite meaning and default value.
- Replaced ImageRect type with System.Drawing.Rectangle in method arguments of GcWicBitmap class.
- Renamed TiffFrame.ReadAsGcBitmap() method to TiffFrame.ToGcBitmap().
- Renamed WicTiffFrame.ReadAsGcWicBitmap() method to WicTiffFrame.ToGcWicBitmap().
- Removed WicImage class (use GcWicBitmap instead).
- Added lowerBitsFirst parameter to the Indexed4bppBitmap class constructor.

## Changed
- Image class is now lightweight. It contains just the image metadata and a binding to the actual image data (e.g. to a disk file or to a stream).
- TiffFrame and WicTiffFrame can be converted to an Image object.
- GcBitmap and GcWicBitmap can be created from an Image object.
- Implemented IImage interface in the following classes: GcBitmap, GcWicBitmap, BilevelBitmap, GrayscaleBitmap, Indexed4bppBitmap, Indexed8bppBitmap.
- Optimized GcTiffReader and GcWicTiffReader for a situation when a single frame should be loaded from a large TIFF file.

## Fixed
- Fixed a bug in GcGifWriter that occurred when storing global palette with less than 129 colors.

## Added
- Added GcGraphics.DrawRoundRect(RectangleF bounds, Pen left, Pen top, Pen right, Pen bottom, CornerRadius cornerRadius) method, allows to render multi-style rounded border.
- Added GcBitmap.CompositeAndBlend() method that supports all Porter Duff compositing operators and the advanced blending modes for combining two bitmaps into a single image.
- Added AutoLevel(), AdjustLevels(), ExportColorChannel() and ImportColorChannel() methods to GcBitmap.
- Added AutoContrast() and AdjustLevels() methods to GrayscaleBitmap.
- Added constructors to GcWicBitmap that accept path, stream, or byte array.
- It is now possible to load any frame (not only the first one) from a TIFF file or stream into GcBitmap, GcWicBitmap and Image objects.
- Added support for all MS Excel pattern fills to the HatchStyle enumeration.
- Added a ToGcBitmap() method overload that accepts an existing instance of GcBitmap to the following classes: TiffFrame, BilevelBitmap, GrayscaleBitmap, Indexed4bppBitmap, Indexed8bppBitmap.
- Added GcBitmap.ToIndexed4bppBitmap() and GcBitmap.ToIndexed4bppBitmap() method overloads that accept a custom palette and a dithering method.
- Added GcBitmap.ToIndexed4bppBitmap() and GcBitmap.ToIndexed4bppBitmap() method overloads that use the Octree quantizer algorithm.
- Added GcBitmap.GenerateOctreePalette() method that creates an Octree quantizer based palette for the current image.
- Added LowerBitsFirst property to Indexed4bppBitmap class.
- Added Clip() method to Indexed4bppBitmap, Indexed8bppBitmap, BilevelBitmap, GrayscaleBitmap.
- Added GcGifReader and GcGifWriter classes that allow to read and write multi-frame GIF files.
- ICC profile can be loaded and saved to the following formats: JPEG, PNG, TIFF, GIF. Added IccProfileData property to GcBitmap and other bitmap classes.
- Added new constructors to GcBitmap and GrayscaleBitmap that accept existing pixel data to be modified in-place.
- Added ToPngStream() method to IImage interface and all related classes.

Version History

Version Downloads Last updated 283 6/9/2019 514 4/24/2019 834 3/25/2019 217 3/12/2019 307 3/1/2019 834 1/25/2019 365 12/18/2018 2,398 12/5/2018 239 11/21/2018 327 11/13/2018 393 10/24/2018 469 9/28/2018