FreeImage.NET Class Library Reference
FreeImageGetUniqueColors Method |
This function returns the number of unique colors actually used by the
specified 1-, 4-, 8-, 16-, 24- or 32-bit image. This might be different from
what function FreeImage_GetColorsUsed() returns, which actually returns the
palette size for palletised images. Works for
FIT_BITMAP type images only.
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public static int GetUniqueColors( FIBITMAP dib )
Parameters
- dib
- Type: FreeImageAPIFIBITMAP
Handle to a FreeImage bitmap.
Return Value
Type: Int32Returns the number of unique colors used by the image specified or zero, if the image type cannot be handled.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | dib is null. |
See Also