IM_ALLOC1D

im_alloc1D - allocate 1D pixel buffer for an image

Synopsis

char *im_alloc1D(Image, PixType)
   IM_TYPE *Image;
   int PixType;

Description

The im_alloc1D routine allocates a 1D pixel buffer of the specified type to hold the pixels in the specified image. The pixel type does not need to correspond to the data type stored on disk, since im_read and im_write do type conversions during I/O. The parameters to this routine are:

Image - This is a pointer to a IM_TYPE data structure which was previously initialized using im_open or im_create.

PixType - This is a value which specifies the type of pixel data stored in the buffer. Valid values for this field are: BYTE, SHORT, INT, FLOAT, DOUBLE, COMPLEX, COLOR, PSEUDO (all defined in IM.h).

Files

Source is in $KUIM/src/libIM

See Also

im_create, im_open, im_read, im_write, im_get_title, im_put_title, im_get_cmap, im_put_cmap, im_alloc1D, im_alloc2D, im_alloc3D, im_free1D, im_free2D, im_free3D.

Author

John M. Gauch
Electrical Engineering and Computer Science
University of Kansas

Diagnostics

When this routine succeeds, a pointer to the buffer is returned. Upon occurrence of any error condition, a message is printed and the program exits.