In This Topic
Breaking Changes
This version of the product has the following breaking changes.
-
Use the GcBitmap.EnsureRendererCreated() method instead of GcBitmap.Renderer property to make sure a non-null instance of BitmapRenderer is returned.
-
Renamed GcBitmap.AsBilevelBitmap() method to ToBilevelBitmap (the transparencyMask parameter replaced with the colorChannel parameter, blackIsZero replaced with whiteIsZero with opposite meaning and default value).
-
Renamed GcBitmap.AsGrayscaleBitmap() method to ToGrayscaleBitmap() method (the transparencyMask parameter has been replaced with the colorChannel parameter, blackIsZero parameter has been replaced with whiteIsZero with opposite meaning and default value).
-
Replaced BlackIsZero property in the BilevelBitmap and GrayscaleBitmap classes with WhiteIsZero property having opposite meaning.
-
Replaced blackIsZero parameter of BilevelBitmap and GrayscaleBitmap constructors with whiteIsZero parameter having opposite meaning and default value.
-
Removed Image.ConvertToGrayscale() method (instead, you can use the Image.ToGcBitmap() and apply GrayscaleEffect to GcBitmap).
-
Moved the Disposed property from the Image class to the IImage interface.
-
Replaced Image.AsGcBitmap() method with the IImage.ToGcBitmap() method (IImage interface is supported in Image and various bitmap classes).
-
Removed ToPngStream(), ToJpegStream(), GifStream(), FromGcBitmap(), FromFileDeferred(), FromStreamDeferred() and FromBytesDeferred() methods from the Image class. Instead of the removed methods, you can call the Image.ToGcBitmap() and then call any of the GcBitmap.SaveAs() methods to accomplish similar tasks.
-
Removed withICC argument from FromFile(), FromStream() and FromBytes() methods of the Image class.
-
Added frameIndex as second parameter to the constructors of GcBitmap class which accepts path, stream, or byte array as the first argument.
-
Replaced ImageRect type with System.Drawing.Rectangle in method arguments of the GcWicBitmap class.
-
Renamed TiffFrame.ReadAsGcBitmap() method to TiffFrame.ToGcBitmap().
-
Renamed WicTiffFrame.ReadAsGcWicBitmap() method to WicTiffFrame.ToGcWicBitmap().
-
Removed WicImage class (instead, use GcWicBitmap class).
-
Removed the Clone() method from the Image class.
-
Added the lowerBitsFirst parameter to the Indexed4bppBitmap class constructor.
Changes From the Previous Release
This version of the product has the following changes.
- Image class is now lightweight and contains just the image metadata and a binding to the actual image data (e.g. to a disk file or to a stream).
- Now, users can convert TiffFrame and WicTiffFrame to an Image object.
- GcBitmap and GcWicBitmap can be created from an Image object.
- The IImage interface has been implemented in the following classes: GcBitmap, GcWicBitmap, BilevelBitmap, GrayscaleBitmap, Indexed4bppBitmap, Indexed8bppBitmap.
- Optimized the GcTiffReader and GcWicTiffReader for a scenario wherein users want to load a single frame from a large TIFF file.
New Features and Improvements
The following features have been added with this version of the product.
- Added GcGraphics.DrawRoundRect(RectangleF bounds, Pen left, Pen top, Pen right, Pen bottom, CornerRadius cornerRadius) method, which allows rendering of multi-style rounded border.
- Added GcBitmap.CompositeAndBlend() method supporting 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 the GcBitmap class.
- Added AutoContrast() and AdjustLevels() methods to the GrayscaleBitmap class.
- Implemented the IImage interface in the GcBitmap, GcWicBitmap, BilevelBitmap, GrayscaleBitmap, Indexed4bppBitmap and Indexed8bppBitmap classes.
- TiffFrame and WicTiffFrame can be converted to an Image object.
- Optimized GcTiffReader and GcWicTiffReader for a situation where only frame is loaded from large TIFF file.
- It is possible to load second, third, and other frames from a TIFF file or stream with GcBitmap, GcWicBitmap, and Image classes.
- GcBitmap and GcWicBitmap can be created from an Image object.
- Added constructors to GcWicBitmap class which accepts path, stream, or byte array.
- Added the ToGcBitmap() method overload that accepts an existing instance of GcBitmap to the following classes: TiffFrame, BilevelBitmap, GrayscaleBitmap, Indexed4bppBitmap and 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 based on the Octree quantizer algorithm.
- Added GcBitmap.GenerateOctreePalette() method which creates an Octree quantizer based palette for the current image.
- Added LowerBitsFirst property to the Indexed4bppBitmap class.
- Added Clip() method to the Indexed4bppBitmap, Indexed8bppBitmap, BilevelBitmap, and GrayscaleBitmap classes.
- Added the GcGifReader and GcGifWriter classes that allow users to read and write multi-frame GIF files.
- Added IccProfileData property to the GcBitmap class and other bitmap classes.
- ICC profile can now be loaded and saved to the following formats: JPEG, PNG, TIFF, and GIF.
- Added new constructors to the GcBitmap and GrayscaleBitmap classes that accept existing pixel data to be modified in-place.
- Added ToPngStream() method to the IImage interface and all its related classes.
- Image class is now lightweight. It contains the image metadata and binding to actual image data.
- Added support for all MS Excel pattern fills in the HatchStyle enumeration.
- 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.
Bug Fixes
The following issue has been resolved since the last release.
- While storing the global palette with less than 129 colors, GcGifWriter doesn't throw any errors now.