gflChangeColorDepth
The gflChangeColorDepth function changes the picture type.
GFL_ERROR gflChangeColorDepth( GFL_BITMAP * src,
GFL_BITMAP ** dst,
GFL_MODE mode,
GFL_MODE_PARAMS params );
Parameters
- src
- Pointer to a GFL_BITMAP structure.
- dst
-
Address of a pointer to a GFL_BITMAP structure.
NULL if on the same instance. - mode
-
GFL_MODE_TO_BINARY Binary (8 bits) GFL_MODE_TO_4GREY 4 Greyscale (8 bits) GFL_MODE_TO_8GREY 8 Greyscale (8 bits) GFL_MODE_TO_16GREY 16 Greyscale (8 bits) GFL_MODE_TO_32GREY 32 Greyscale (8 bits) GFL_MODE_TO_64GREY 64 Greyscale (8 bits) GFL_MODE_TO_128GREY 128 Greyscale (8 bits) GFL_MODE_TO_216GREY 216 Greyscale (8 bits) GFL_MODE_TO_256GREY 256 Greyscale (8 bits) GFL_MODE_TO_8COLORS 8 Colors (8 bits) GFL_MODE_TO_16COLORS 16 Colors (8 bits) GFL_MODE_TO_32COLORS 32 Colors (8 bits) GFL_MODE_TO_64COLORS 64 Colors (8 bits) GFL_MODE_TO_128GREY 128 Colors (8 bits) GFL_MODE_TO_216COLORS 216 Colors (8 bits) GFL_MODE_TO_256COLORS 256 Colors (8 bits) GFL_MODE_TO_RGB Red-Green-Blue (24 bits) GFL_MODE_TO_RGBA Red-Green-Blue-Alpha (32 bits) GFL_MODE_TO_BGR Blue-Green-Red (24 bits) GFL_MODE_TO_ABGR Alpha-Blue-Green-Red (32 bits) GFL_MODE_TO_BGRA Blue-Green-Red-Alpha (32 bits) - params
-
Indicates a dither to be used for colors, greyscale & binary.
GFL_MODE_NO_DITHER No dithering GFL_MODE_ADAPTIVE Adaptive without dithering GFL_MODE_PATTERN_DITHER Pattern dithering GFL_MODE_HALTONE45_DITHER HalfTone 45 dithering GFL_MODE_HALTONE90_DITHER HalfTone 90 dithering GFL_MODE_FLOYD_STEINBERG Floyd-Steinberg dithering
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also