KWIN_COMPUTE_PC_SUBIMAGE(3)

EXPERIMENTAL_FUNC
kwin_compute_pc_subimage - Compute PseudoColour subimage for a pixel canvas.

SYNOPSIS
#include <karma_kwin.h>

flag kwin_compute_pc_subimage

(KPixCanvas canvas, int x_off, int y_off, int x_pixels,int y_pixels, int cache_width, int cache_height, CONST char *slice, CONST uaddr *hoffsets, CONST uaddr *voffsets, unsigned int image_width, unsigned int image_height, unsigned int type, unsigned int conv_type, unsigned int num_pixels, unsigned long *pixel_values, unsigned long blank_pixel, unsigned long min_sat_pixel, unsigned long max_sat_pixel, double i_min, double i_max, flag (*iscale_func) (), void *iscale_info, KPixCanvasImageCache *cache)

DESCRIPTION
This routine will compute a subimage cache for a 2-dimensional slice of a Karma array for a pixel canvas. This slice may be tiled. The slice is a PseudoColour subimage.

canvas
    The pixel canvas.

x_off
    The horizontal offset of the subimage, relative to the top-left corner of the image cache.

y_off
    The vertical offset of the subimage, relative to the top-left corner of the image cache.

x_pixels
    The number of horizontal pixels to generate.

y_pixels
    The number of vertical pixels to generate.

cache_width
    The width of the image cache.

cache_height
    The height of the image cache.

slice
    The start of the slice image data.

hoffsets
    The array of horizontal byte offsets for the input image.

voffsets
    The array of vertical byte offsets for the input image.

image_width
    The width of the input image (in values).

image_height
    The height of the input image (in values).

type
    The type of the slice image data.

conv_type
    The input conversion type (when the input is complex).

num_pixels
    The number of pixels in the pixel array.

pixel_values
    The array of pixel values.

blank_pixel
    The pixel value to be used when the intensity value is an undefined value.

min_sat_pixel
    The pixel value to be used when the intensity value is below the minimum value.

max_sat_pixel
    The pixel value to be used when the intensity value is above the maximum value.

i_min
    The minimum intensity value.

i_max
    The maximum intensity value.

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 <-kwin_PROTO_iscale_func->.

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

cache
    Cache data is written here. The routine will 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 <-kwin_free_cache_data->, otherwise shared memory segments could remain after the process exits.

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/