gflChangeColorDepth

GFL SDK

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_BINARYBinary (8 bits)
    GFL_MODE_TO_4GREY4 Greyscale (8 bits)
    GFL_MODE_TO_8GREY8 Greyscale (8 bits)
    GFL_MODE_TO_16GREY16 Greyscale (8 bits)
    GFL_MODE_TO_32GREY32 Greyscale (8 bits)
    GFL_MODE_TO_64GREY64 Greyscale (8 bits)
    GFL_MODE_TO_128GREY128 Greyscale (8 bits)
    GFL_MODE_TO_216GREY216 Greyscale (8 bits)
    GFL_MODE_TO_256GREY256 Greyscale (8 bits)
    GFL_MODE_TO_8COLORS8 Colors (8 bits)
    GFL_MODE_TO_16COLORS16 Colors (8 bits)
    GFL_MODE_TO_32COLORS32 Colors (8 bits)
    GFL_MODE_TO_64COLORS64 Colors (8 bits)
    GFL_MODE_TO_128GREY128 Colors (8 bits)
    GFL_MODE_TO_216COLORS216 Colors (8 bits)
    GFL_MODE_TO_256COLORS256 Colors (8 bits)
    GFL_MODE_TO_RGBRed-Green-Blue (24 bits)
    GFL_MODE_TO_RGBARed-Green-Blue-Alpha (32 bits)
    GFL_MODE_TO_BGRBlue-Green-Red (24 bits)
    GFL_MODE_TO_ABGRAlpha-Blue-Green-Red (32 bits)
    GFL_MODE_TO_BGRABlue-Green-Red-Alpha (32 bits)
    params
    Indicates a dither to be used for colors, greyscale & binary.
    GFL_MODE_NO_DITHERNo dithering
    GFL_MODE_ADAPTIVEAdaptive without dithering
    GFL_MODE_PATTERN_DITHERPattern dithering
    GFL_MODE_HALTONE45_DITHERHalfTone 45 dithering
    GFL_MODE_HALTONE90_DITHERHalfTone 90 dithering
    GFL_MODE_FLOYD_STEINBERGFloyd-Steinberg dithering

Return value

    The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

See also