The "imc" Package
These routines provide a number of image conversion routines.
Library: karma
Link With: -lkarma
Functions
imc_24to8 | Convert a 24 bit truecolour image to an 8 bit pseudocolour image.
|
Functions
flag
imc_24to8 (unsigned int image_size, unsigned char *image_reds,
unsigned char *image_greens, unsigned char *image_blues,
int stride24, unsigned char *out_image, int stride8,
unsigned int max_colours, unsigned int speed,
packet_desc **pack_desc, char **packet)
Convert a 24 bit truecolour image to an 8 bit pseudocolour image.
Parameters:
- image_size :
The size of the image (in pixels).
- image_reds :
The red component data of the truecolour image.
- image_greens :
The green component data of the truecolour image.
- image_blues :
The blue component data of the truecolour image.
- stride24 :
The stride (in bytes) between adjacent pixels in the truecolour
image.
- out_image :
The output (8 bit pseudocolour) image data.
- stride8 :
The stride (in bytes) between adjacent pixels in the pseudocolour
image.
- max_colours :
The maximum number of unique colours permitted (i.e. the
maximum colour palette size that can be supported).
- speed :
The desired speed of the routine. This value may range from 0 to 9.
A value of 0 will result in the slowest but highest quality conversion
(i.e. the routine tries very hard to choose the best colour palette). A
value of 9 will result in the fastest conversion, at the expense of image
quality.
- pack_desc :
The pointer to the top level packet descriptor of the general
data structure which contains the colourmap will be written here.
- packet :
The pointer to the top level packet of the general data structure
which contains the colourmap will be written here.
Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Contact: Richard Gooch
Web Development: Ariel Internet Services