IMW_SCMAP_16TO24_LOSSY(3)

EXPERIMENTAL_FUNC
imw_scmap_16to24_lossy - Write 16bit image to a 24bit image using a software colourmap.

SYNOPSIS
#include <karma_imw.h>

flag imw_scmap_16to24_lossy

(unsigned char *out_red_image, unsigned char *out_green_image, unsigned char *out_blue_image, flag preserve_pad, iaddr out_hstride, iaddr out_vstride, int out_width, int out_height, CONST unsigned short *inp_image, int inp_width, int inp_height, CONST iaddr *inp_hoffsets, CONST iaddr *inp_voffsets, CONST unsigned char *cmap_red, CONST unsigned char *cmap_green, CONST unsigned char *cmap_blue, iaddr cmap_stride)

DESCRIPTION
This routine will write a 16bit PseudoColour image into a 24bit TrueColour image using a software colourmap to convert 16bit values to 24bit RGB values. The input and output sizes may be different. The output image is flipped vertically relative to the input image.

out_red_image
    The output red image components will be written here.

out_green_image
    The output green image components will be written here.

out_blue_image
    The output blue image components will be written here.

preserve_pad
    If TRUE, padding bytes between output pixels will be preserved, else they may be overwritten for efficiency.

out_hstride
    The horizontal stride in bytes between output pixels.

out_vstride
    The vertical stride in bytes between output lines.

out_width
    The width of the output image.

out_height
    The height of the output image.

inp_image
    The input 16bit PseudoColour image.

inp_hoffsets
    The array of horizontal input byte offsets.

inp_voffsets
    The array of vertical input byte offsets.

inp_width
    The width of the input image.

inp_height
    The height of the input image.

cmap_red
    The red component virtual colourmap.

cmap_green
    The green component virtual colourmap.

cmap_blue
    The blue component virtual colourmap.

cmap_stride
    The stride in bytes between colourmap entries. The number of entries must be 65536 (16bit addressing).

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/