FOREIGN_PPM_WRITE_PSEUDO(3)

EXPERIMENTAL_FUNC
foreign_ppm_write_pseudo - Write a PseudoColor image to a channel in PPM format.

SYNOPSIS
#include <karma_foreign.h>

flag foreign_ppm_write_pseudo

(Channel channel, flag binary, CONST char *image, unsigned int type, uaddr *hoffsets, uaddr *voffsets, unsigned int inp_width, unsigned int inp_height, unsigned int out_width, unsigned int out_height, CONST unsigned short *cmap_reds, CONST unsigned short *cmap_greens, CONST unsigned short *cmap_blues, unsigned int cmap_size, unsigned int min_sat_index, unsigned int max_sat_index, unsigned int blank_index, unsigned int cmap_stride, double i_min, double i_max, flag (*iscale_func) (), void *iscale_info)

DESCRIPTION
Write a PseudoColor image to a channel in PPM format.

channel
    The channel to write to. The channel is not flushed.

binary
    If TRUE, the pixels will be written in binary mode.

image
    The image data.

type
    The type of the image data.

hoffsets
    The array of horizontal byte offsets.

voffsets
    The array of vertical byte offsets.

inp_width
    The width of the input image.

inp_height
    The height of the input image.

out_width
    The width of the output image. If the input image is smaller than this, then the image will be centred with blank-filling. If the input image is larger than this, the image will be truncated. If this is 0, the output image will be the same width as the input image.

out_height
    The height of the output image. If the input image is smaller than this, then the image will be centred with blank-filling. If the input image is larger than this, the image will be truncated. If this is 0, the output image will be the same height as the input image.

cmap_reds
    The red colourmap values.

cmap_greens
    The green colourmap values.

cmap_blues
    The blue colourmap values.

cmap_size
    The number of colourmap entries.

min_sat_index
    The index into the colourmap for the colour to use when data values are below <<i_min>>.

max_sat_index
    The index into the colourmap for the colour to use when data values are above <<i_max>>.

blank_index
    The index into the colourmap for the colour to use when data values are blank.

cmap_stride
    The stride (in unsigned shorts) between colourmap values.

i_min
    The minimum image value. Image values below this will be clipped.

i_max
    The maximum image value. Image values above this will be clipped.

iscale_func
    The function to be called when non-linear intensity scaling is required. If NULL, linear intensity scaling is used. The prototype function is <-imw_PROTO_iscale_func->.

iscale_info
    A pointer to arbitrary information for <<iscale_func>>.

RETURN VALUE
TRUE on succes, 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/