FOREIGN_PPM_WRITE_RGB(3)

EXPERIMENTAL_FUNC
foreign_ppm_write_rgb - Write a TrueColor image to a channel in PPM format.

SYNOPSIS
#include <karma_foreign.h>

flag foreign_ppm_write_rgb

(Channel channel, flag binary, CONST unsigned char *image_red, CONST unsigned char *image_green, CONST unsigned char *image_blue, uaddr *hoffsets, uaddr *voffsets, unsigned int inp_width, unsigned int inp_height, unsigned int out_width, unsigned int out_height, CONST unsigned short *cmap_red, CONST unsigned short *cmap_green, CONST unsigned short *cmap_blue, unsigned int cmap_stride)

DESCRIPTION
Write a TrueColor 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.

red_image
    The red image data.

green_image
    The green image data.

blue_image
    The blue 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_red
    The red component colourmap entries. 256 entries required. If this is NULL a linear mapping is assumed.

cmap_green
    The green component colourmap entries. 256 entries required. If this is NULL a linear mapping is assumed.

cmap_blue
    The blue component colourmap entries. 256 entries required. If this is NULL a linear mapping is assumed.

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

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/