im_close - close an image descriptor
im_close(3) frees all the resources attached to the image descriptor.
This may involve closing files, freeing memory buffers, triggering
close callback lists, unmapping files, freeing regions, and so on. If
all this succeeds, then the function returns zero. If something goes
wrong, the function returns non-zero and sets im_errormsg(3). If
im_close(3) fails, the image descriptor is left in an undefined state.
In the case that the image descriptor corresponds to a file opened by
im_openout(3) that has been written to, the function sets an output
description file as follows: If the output image filename is
terminated with ".v", the string held by the Hist member of the image
descriptor is copied to a corresponding file ending with ".desc" in the
same directory. In all other cases, an output .desc file is not
If a NULL pointer is passed to im_close(3), it returns successfully
The function returns 0 on success and -1 on error.
N. Dessipris, K. Martinez, J. Cupitt
im_mmapin(3), im_openin(3), im_openout(3), im_setbuf(3), im_open(3),
N. Dessipris - 11/04/1990
11 April 1990