Converts a FreeImage bitmap from one color depth to another.
If the conversion fails the original FreeImage bitmap is returned.
Namespace:
FreeImageAPIAssembly: FreeImageNET (in FreeImageNET.dll)
Syntax
C# |
---|
public static FIBITMAP ConvertColorDepth( FIBITMAP dib, FREE_IMAGE_COLOR_DEPTH conversion, FREE_IMAGE_DITHER ditherMethod, bool unloadSource ) |
Visual Basic (Declaration) |
---|
Public Shared Function ConvertColorDepth ( _ dib As FIBITMAP, _ conversion As FREE_IMAGE_COLOR_DEPTH, _ ditherMethod As FREE_IMAGE_DITHER, _ unloadSource As Boolean _ ) As FIBITMAP |
Visual C++ |
---|
public: static FIBITMAP ConvertColorDepth( FIBITMAP dib, FREE_IMAGE_COLOR_DEPTH conversion, FREE_IMAGE_DITHER ditherMethod, bool unloadSource ) |
Parameters
- dib
- Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.
- conversion
- Type: FreeImageAPI..::.FREE_IMAGE_COLOR_DEPTH
The desired output format.
- ditherMethod
- Type: FreeImageAPI..::.FREE_IMAGE_DITHER
Dither algorithm when converting with FICD_01_BPP_DITHER.
- unloadSource
- Type: System..::.Boolean
When true the structure will be unloaded on success.
Return Value
Handle to a FreeImage bitmap.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | dib is null. |