IM: Data Type Utilities

IM - An Imaging Tool

Data Type Utilities
[Utilities]


Detailed Description

See im_util.h


Defines

#define IM_BYTECROP(_v)   (_v < 0? 0: _v > 255? 255: _v)
#define IM_CROPMAX(_v, _max)   (_v < 0? 0: _v > _max? _max: _v)

Typedefs

typedef unsigned char imbyte
typedef unsigned short imushort

Functions

int imDataTypeSize (int data_type)
const char * imDataTypeName (int data_type)
unsigned long imDataTypeIntMax (int data_type)
long imDataTypeIntMin (int data_type)

Function Documentation

int imDataTypeSize int  data_type  ) 
 

Returns the size in bytes of a specified numeric data type.

im.DataTypeSize(data_type: number) -> size: number [in Lua 5] 

const char* imDataTypeName int  data_type  ) 
 

Returns the numeric data type name given its identifier.

im.DataTypeName(data_type: number) -> name: string [in Lua 5] 

unsigned long imDataTypeIntMax int  data_type  ) 
 

Returns the maximum value of an integer data type. For floating point returns 0.

im.DataTypeIntMax(data_type: number) -> int_max: number [in Lua 5] 

long imDataTypeIntMin int  data_type  ) 
 

Returns the minimum value of an integer data type. For floating point returns 0.

im.DataTypeIntMin(data_type: number) -> int_min: number [in Lua 5]