wvFReadImage reads an image from the input stream fp. The file
format is determined from the file header. If the header is not recognized, a
NULL pointer is returned.
wvFWriteImage writes image to the output stream fp
using the file format specified by imgType. The comments
will be embedded in the image file header, if possible.
The WVimage data type is defined in <io_image.h> as:
typedef struct _WVimage {
unsigned char numChannels;
WVmatrix **channel;
} WVimage;
numChannels is the number of channels which make up the image. A
grayscale or black-and-white image has one channel (the brightness), while
a color image typically has three color channels: red, green, and blue.
channel is an array of pointers to matrices, one for each channel in
the image.
Supported file formats are:
| WV_IMAGEFILE_PPM | raw PPM (RGB color pixelmap) format |
| WV_IMAGEFILE_PGM | raw PGM (grayscale pixelmap) format |
| WV_IMAGEFILE_RGB | Silicon Graphics RGB format |