NAME
nst_read_pnm_file - read ppm or pgm image into float array
PROTOTYPE
int nst_read_pnm_file( FILE *fp, int iDx, int iDy, int iXll, int iYll, float *pfR, float *pfG, float *pfB)
ARGUMENTS
- FILE *fp
- file ptr of source file
- int iDx
- width of image rectangle to read
- int iDy
- height of image rectangle to read
- int iXll
- x-offset of lower left corner of img rect to read
- int iYll
- y-offset of lower left corner of img rect to read
- float *pfR
- destination for red or mono image data
- float *pfG
- destination for green image data
- float *pfB
- destination for blue image data
DESCRIPTION:
Read a subrectangle of width iDx and height iDy with lower left
corner at (iXll,iYll) from pnm - file fp. If parts of the specified
rectangle are outside the image rectangle specified in the file, these
parts are set black and only the intersection is filled.
Arguments pfR,pfG,pfB must point to the start of (sufficient) destination
memory for the red, green and blue image data.
When the file is a pgm-file (i.e., specifies only monochrome
data), or when at least one of pfG and pfB is NULL, only
mono data will be returned in pfR (in the case of a
ppm file, this will be (R+G+B)/3).
SEE ALSO:
nst_read_pnm_file8
FILE
/local/homes/rhaschke/nst7/man/../o.linx86//../nstsrc/nst_aux4.c