The "imw" Package

These routines provide a means to convert from image data to raw images suitable for low level graphics display. Although these routines are made public, their use is NOT recommended. The viewimg package is the suggested means to manage image display.

Library: karma
Link With: -lkarma

Functions

imw_to8_lossyConvert generic image to 8 bit image, with resizing.
imw_to8_oiConvert generic image to 8 bit image, preserving size.

Prototype Functions

IMW_PROTO_iscale_funcIntensity scaling callback.


Functions


flag imw_to8_lossy (unsigned char *out_image, 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)

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. The output image is flipped vertically relative to the input image.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe.


flag imw_to8_oi (unsigned char *out_image, iaddr out_hstride, iaddr out_vstride, int width, int height, CONST char *inp_image, CONST iaddr *inp_hoffsets, CONST iaddr *inp_voffsets, 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)

This routine will convert an image from one format to an 8 bit image of pixels, maintaining the original image size. The output image is flipped vertically relative to the input image.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe.


Prototype Functions


flag IMW_PROTO_iscale_func (double *out, unsigned int out_stride, double *inp, unsigned int inp_stride, unsigned int num_values, double i_min, double i_max, void *info)

This routine will perform an arbitrary intensity scaling on an array of values. This routine may be called many times to scale an image.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


Contact: Richard Gooch
Web Development: Ariel Internet Services