GH_IconTable

public sealed class GH_IconTable
Utility class for caching 32BppPArgb icons with fast lookup. Icons are hashed using a hashing algorithm to prevent identical entries.

Properties

Count

#
public static int Count { get; }
Gets the number of cached icons.

Methods

Icon

#
public static Bitmap Icon(int index)
Gets the icon at the specified index.
index (int)Index of icon to retrieve.
The icon associated with the runtime index.

RegisterIcon

#
public static int RegisterIcon(Bitmap icon)
Register a new icon with the table. If the supplied icon is a null reference, the NullIconIndex will be returned.
icon (Bitmap)Icon to register.
Index of icon in table. Use this index for fast retrieval.

ResizeImage

#
public static Bitmap ResizeImage(Image img, Size size, InterpolationMode mode, PixelFormat format)
Create a new bitmap which is the resized version of an existing image.
img (Image)Image to resize.
size (Size)New size.
mode (InterpolationMode)Interpolation mode to use.
format (PixelFormat)Bitmap pixelformat.
A new bitmap.

To32BppArgb

#
public static Bitmap To32BppArgb(Image img)
Converts an image into 32BitPerPixelAlphaRedGreenBlue format.
img (Image)

To32BppPArgb

#
public static Bitmap To32BppPArgb(Image img)
Converts an image into 32BitPerPixelPremultipliedAlphaRedGreenBlue format. This format draws much faster in GDI+ operations. However, there will be no gain unless you cache the result of this function.
img (Image)