\defgroup datatypeutl Data Type Utilities \par See \ref im_util.h \ingroup util @{
CPU Byte Orders. * \ingroup bin
\defgroup util Utilities \par See \ref im_util.h @{
Returns the current CPU byte order. * \ingroup bin
Changes the byte order of an array of 2, 4 or 8 byte values. * \ingroup bin
Changes the byte order of an array of 2 byte values. * \ingroup bin
Inverts the byte order of the 4 byte values * \ingroup bin
Inverts the byte order of the 8 byte values * \ingroup bin
Decode RGB components from a long for palette usage. \n * "long" definition is compatible with the CD library definition. * * \verbatim im.ColorDecode(color: lightuserdata) -> red: number, green: number, blue: number [in Lua 5] \endverbatim * \ingroup colorutl
Encode RGB components in a long for palette usage. \n * "long" definition is compatible with the CD library definition. * * \verbatim im.ColorEncode(red: number, green: number, blue: number) -> color: lightuserdata [in Lua 5] \endverbatim * \ingroup colorutl
Returns the number of components of the color space including alpha. * * \verbatim im.ColorModeDepth(color_mode: number) -> depth: number [in Lua 5] \endverbatim * \ingroup colormodeutl
Check if the color mode has an alpha channel. * * \verbatim im.ColorModeHasAlpha(color_mode: number) -> has_alpha: boolean [in Lua 5] \endverbatim * \ingroup colormodeutl
Check if the color mode and data_type defines a display bitmap image. * * \verbatim im.ColorModeIsBitmap(color_mode: number, data_type: number) -> is_bitmap: boolean [in Lua 5] \endverbatim * \ingroup colormodeutl
Check if the color mode components are packed in one plane. * * \verbatim im.ColorModeIsPacked(color_mode: number) -> is_packed: boolean [in Lua 5] \endverbatim * \ingroup colormodeutl
Check if the color mode orients the image from top down to bottom. * * \verbatim im.ColorModeIsTopDown(color_mode: number) -> is_top_down: boolean [in Lua 5] \endverbatim * \ingroup colormodeutl
Check if the two color modes match. Only the color space is compared. * * \verbatim im.ColorModeMatch(color_mode1: number, color_mode2: number) -> match: boolean [in Lua 5] \endverbatim * \ingroup colormodeutl
Returns the color space of the color mode. * * \verbatim im.ColorModeSpace(color_mode: number) -> color_space: number [in Lua 5] \endverbatim * \ingroup colormodeutl
Returns the color mode name. * * \verbatim im.ColorModeSpaceName(color_mode: number) -> name: string [in Lua 5] \endverbatim * \ingroup colormodeutl
Returns the color space of the equivalent display bitmap image. \n * Original packing and alpha are ignored. Returns IM_RGB, IM_GRAY, IM_MAP or IM_BINARY. * * \verbatim im.ColorModeToBitmap(color_mode: number) -> color_space: number [in Lua 5] \endverbatim * \ingroup colormodeutl
Compresses the data using the libLZF compression. \n * Returns the size of the compressed buffer or zero if failed. * \ingroup compress
Compresses the data using the libLZO compression. (Since 3.9) \n Returns the size of the compressed buffer or zero if failed. \n Available in a separate library called "im_lzo" which license is GPL. \ingroup compress
Uncompresses the data compressed with the libLZF compression. \n * Returns zero if failed. * \ingroup compress
Uncompresses the data compressed with the libLZO compression. (Since 3.9) \n Returns zero if failed. \n Available in a separate library called "im_lzo" which license is GPL. \ingroup compress
Uncompresses the data compressed with the ZLIB Deflate compression. \n * Returns zero if failed. * \ingroup compress
Compresses the data using the ZLIB Deflate compression. \n * The destination buffer must be at least 0.1% larger than source_size plus 12 bytes. \n * It compresses raw byte data. zip_quality can be 1 to 9. \n * Returns the size of the compressed buffer or zero if failed. * \ingroup compress
Returns the maximum value of an integer data type. For floating point returns 0. * * \verbatim im.DataTypeIntMax(data_type: number) -> int_max: number [in Lua 5] \endverbatim * \ingroup datatypeutl
Returns the minimum value of an integer data type. For floating point returns 0. * * \verbatim im.DataTypeIntMin(data_type: number) -> int_min: number [in Lua 5] \endverbatim * \ingroup datatypeutl
Returns the numeric data type name given its identifier. * * \verbatim im.DataTypeName(data_type: number) -> name: string [in Lua 5] \endverbatim * \ingroup datatypeutl
Returns the size in bytes of a specified numeric data type. * * \verbatim im.DataTypeSize(data_type: number) -> size: number [in Lua 5] \endverbatim * \ingroup datatypeutl
Check if the combination color_mode+data_type is valid. * * \verbatim im.ImageCheckFormat(color_mode: number, data_type: number) -> check: boolean [in Lua 5] \endverbatim * \ingroup imageutil
Returns the size of the data buffer. * * \verbatim im.ImageDataSize(width: number, height: number, color_mode: number, data_type: number) -> datasize: number [in Lua 5] \endverbatim * \ingroup imageutil
Returns the number of elements of one line of the data buffer. \n * This depends if the components are packed. If packed includes all components, if not includes only one. * * \verbatim im.ImageLineCount(width: number, color_mode: number) -> linecount: number [in Lua 5] \endverbatim * \ingroup imageutil
Returns the size of one line of the data buffer. \n * This depends if the components are packed. If packed includes all components, if not includes only one. * * \verbatim im.ImageLineSize(width: number, color_mode: number, data_type: number) -> linesize: number [in Lua 5] \endverbatim * \ingroup imageutil
Check if the data is a string. * \ingroup str
Check if the two strings are equal. * \ingroup str
Calculate the size of the string but limited to max_len. * \ingroup str
Max depth is 4+1 (cmyk+alpha) * \ingroup colormodeutl
\file \brief Utilities
See Copyright Notice in im_lib.d