BitmapExtensions Class

KGy SOFT Drawing Libraries Help
Contains extension methods for the Bitmap type.
Inheritance Hierarchy

SystemObject
  KGySoft.DrawingBitmapExtensions

Namespace:  KGySoft.Drawing
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.1.0
Syntax

public static class BitmapExtensions

The BitmapExtensions type exposes the following members.

Methods

  NameDescription
Public methodStatic memberCode exampleAdjustBrightness
Adjusts the brightness of the specified bitmap.
See the Remarks section for details and an example.
Public methodStatic memberCode exampleAdjustContrast
Adjusts the contrast of the specified bitmap.
See the Remarks section for details and an example.
Public methodStatic memberCode exampleAdjustGamma
Adjusts the gamma correction of the specified bitmap.
See the Remarks section for details and an example.
Public methodStatic memberClear(Bitmap, Color, Color, Byte)
Clears the complete bitmap and fills it with the specified color.
This method is similar to Graphics.Clear but can be used for Bitmaps of any PixelFormat.
Public methodStatic memberClear(Bitmap, Color, IDitherer, Color, Byte)
Clears the complete bitmap and fills it with the specified color.
This method is similar to Graphics.Clear but can be used for Bitmaps of any PixelFormat.
Public methodStatic memberCloneCurrentFrame
Creates a clone of the current frame of the provided Bitmap instance. Unlike the Bitmap(Image) constructor, this method preserves original pixel format, and unlike Bitmap.Clone(Rectangle,PixelFormat) method, this method returns a single frame image.
Public methodStatic memberDither
Quantizes a bitmap with dithering (reduces the number of colors while trying to preserve details) using the specified quantizer and ditherer.
See the Remarks section for details.
Public methodStatic memberExtractBitmaps
When image contains multiple pages, frames or multi-resolution sub-images, returns them as separated Bitmap instances. Otherwise, returns a new Bitmap with the copy of the original image.
Public methodStatic memberGetColorCount
Gets the actual number of colors of the specified bitmap. Colors are counted even for indexed bitmaps.
See the Remarks section for details.
Public methodStatic memberGetColors
Gets the colors used in the defined bitmap. A limit can be defined in maxColors.
See the Remarks section for details.
Public methodStatic memberGetReadableBitmapData
Gets an IReadableBitmapData instance, which provides fast read-only access to the actual data of the specified bitmap. The bitmap can have any PixelFormat.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
Public methodStatic memberCode exampleGetReadWriteBitmapData
Gets an IReadWriteBitmapData instance, which provides fast read-write access to the actual data of the specified bitmap. The bitmap can have any PixelFormat.
See the Remarks section for details and examples.
Public methodStatic memberGetWritableBitmapData
Gets an IWritableBitmapData instance, which provides fast write-only access to the actual data of the specified bitmap. The bitmap can have any PixelFormat.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.
Public methodStatic memberInvert
Inverts the colors of the specified bitmap.
See the Remarks section for details.
Public methodStatic memberMakeGrayscale
Makes a bitmap grayscale.
See the Remarks section for details.
Public methodStatic memberMakeOpaque
Makes a bitmap opaque using the specified backColor.
See the Remarks section for details.
Public methodStatic memberQuantize
Quantizes a bitmap using the specified quantizer (reduces the number of colors).
See the Remarks section for details.
Public methodStatic memberReplaceColor
Replaces every oldColor occurrences to newColor in the specified bitmap.
See the Remarks section for details.
Public methodStatic memberResize
Resizes the image with high quality. The result is always a 32 bit ARGB image.
Public methodStatic memberToCursorHandle
Converts the provided bitmap to a CursorHandle, which can be passed to the System.Windows.Forms.Cursor constructor to create a new cursor.
Public methodStatic memberTransformColors(Bitmap, FuncColor32, Color32, Color, Byte)
Transforms the colors of a bitmap using the specified transformFunction delegate.
See the Remarks section for details.
Public methodStatic memberCode exampleTransformColors(Bitmap, FuncColor32, Color32, IDitherer, Color, Byte)
Transforms the colors of a bitmap using the specified transformFunction delegate.
See the Remarks section for details and an example.
Top
See Also

Reference