VIEWIMG_CREATE_RGB(3)

FUNCTION
viewimg_create_rgb - Create a TrueColour viewable image.

SYNOPSIS
#include <karma_viewimg.h>

ViewableImage viewimg_create_rgb

(KWorldCanvas canvas, multi_array *multi_desc, array_desc *arr_desc, char *slice, unsigned int hdim, unsigned int vdim, unsigned int red_index, unsigned int green_index, unsigned int blue_index, unsigned num_restr, CONST char **restr_names, CONST double *restr_values)

DESCRIPTION
This routine will create a TrueColour viewable image object from a 2-dimensional slice of a Karma data structure. At a later time, this viewable image may be made visible. This routine will not cause the canvas to be refreshed.

canvas
    The world canvas onto which the viewable image may be drawn. Many viewable images may be associated with a single canvas.

multi_desc
    The multi_array descriptor which contains the Karma data structure. The routine increments the attachment count on the descriptor on successful completion. This may be NULL.

arr_desc
    The array descriptor.

slice
    The start of the slice data.

hdim
    The dimension index of the horizontal dimension.

vdim
    The dimension index of the vertical dimension.

red_index
    The element index of the red component in the data packets.

green_index
    The element index of the green component in the data packets.

blue_index
    The element index of the blue component in the data packets.

num_restr
    The number of matched restrictions. If this is 0, no restrictions are recorded.

restr_names
    The restriction names.

restr_values
    The restriction values.

RETURN VALUE
A viewable image on success, else NULL.

Multi-threading Level
Unsafe.

NOTES
The 3 colour components must be of type K_UBYTE .

Restriction information is automatically deallocated when <-viewimg_destroy-> is called.

The routine may produce cache data which will vastly increase the speed of subsequent operations on this data. Prior to process exit, a call MUST be made to <-viewimg_destroy->, otherwise shared memory segments could remain after the process exits.

The ViewableImage will be automatically destroyed if the canvas is destroyed.

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/