IMW_TO8_BILINEAR(3)

EXPERIMENTAL_FUNC
imw_to8_bilinear - Convert generic image to 8 bit image, with resizing.

SYNOPSIS
#include <karma_imw.h>

flag imw_to8_bilinear

(unsigned char *out_image, flag flip, iaddr out_hstride, iaddr out_vstride, int out_width, int out_height, CONST char *inp_image, CONST iaddr *inp_hoffsets, CONST iaddr *inp_voffsets, int inp_width, int inp_height, unsigned int inp_type, unsigned int conv_type, unsigned int num_pixels, CONST unsigned char *pixel_values, unsigned char blank_pixel, unsigned char min_sat_pixel, unsigned char max_sat_pixel, double i_min, double i_max, flag (*iscale_func) (), void *iscale_info)

DESCRIPTION
This routine will convert an image from one format to an 8 bit image of pixels, permitting the input and output sizes to differ. If the input image is effectively shrunk, the input data is subsampled.

out_image
    The output image will be written here.

flip
    If TRUE, the output image is flipped vertically relative to the input image.

out_hstride
    The stride between successive horizontal pixels (in bytes).

out_vstride
    The stride between successive vertical pixels (in bytes).

out_width
    The width of the output image.

out_height
    The height of the output image.

inp_image
    The input image data.

inp_hoffsets
    The array of horizontal byte offsets.

inp_voffsets
    The array of vertical byte offsets.

inp_width
    The width of the input image.

inp_height
    The height of the input image.

inp_type
    The type of the input data.

conv_type
    The input conversion type (when the input is complex). See <-ds_COMPLEX_CONVERSIONS-> for the list of allowed values.

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

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

magnify_func
    The function to call when magnification is required. This may be NULL, in which case a default pixel replication function is used.

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/