Color Mode Utilities
[Image Representation]
Detailed Description
- See im_util.h
Defines | |
#define | imColorModeSpace(_cm) (_cm & 0xFF) |
#define | imColorModeMatch(_cm1, _cm2) (imColorModeSpace(_cm1) == imColorModeSpace(_cm2)) |
#define | imColorModeHasAlpha(_cm) (_cm & IM_ALPHA) |
#define | imColorModeIsPacked(_cm) (_cm & IM_PACKED) |
#define | imColorModeIsTopDown(_cm) (_cm & IM_TOPDOWN) |
Functions | |
const char * | imColorModeSpaceName (int color_mode) |
int | imColorModeDepth (int color_mode) |
int | imColorModeToBitmap (int color_mode) |
int | imColorModeIsBitmap (int color_mode, int data_type) |
Define Documentation
|
Returns the color space of the color mode.
im.ColorModeSpace(color_mode: number) -> color_space: number [in Lua 5] |
|
Check if the two color modes match. Only the color space is compared.
im.ColorModeMatch(color_mode1: number, color_mode2: number) -> match: boolean [in Lua 5] |
|
Check if the color mode has an alpha channel.
im.ColorModeHasAlpha(color_mode: number) -> has_alpha: boolean [in Lua 5] |
|
Check if the color mode components are packed in one plane.
im.ColorModeIsPacked(color_mode: number) -> is_packed: boolean [in Lua 5] |
|
Check if the color mode orients the image from top down to bottom.
im.ColorModeIsTopDown(color_mode: number) -> is_top_down: boolean [in Lua 5] |
Function Documentation
|
Returns the color mode name.
im.ColorModeSpaceName(color_mode: number) -> name: string [in Lua 5] |
|
Returns the number of components of the color space including alpha.
im.ColorModeDepth(color_mode: number) -> depth: number [in Lua 5] |
|
Returns the color space of the equivalent display bitmap image.
im.ColorModeToBitmap(color_mode: number) -> color_space: number [in Lua 5] |
|
Check if the color mode and data_type defines a display bitmap image.
im.ColorModeIsBitmap(color_mode: number, data_type: number) -> is_bitmap: boolean [in Lua 5] |