| .TH IM_CLOSE 3 "11 April 1990" |
| .SH NAME |
| im_close \- close an image descriptor |
| .SH SYNOPSIS |
| #include <vips/vips.h> |
| |
| int im_close(image) |
| .br |
| IMAGE *image; |
| .SH DESCRIPTION |
| 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 created. |
| |
| If a NULL pointer is passed to im_close(3), it returns successfully |
| immediately. |
| .SH RETURN VALUE |
| The function returns 0 on success and -1 on error. |
| .SH COPYRIGHT |
| N. Dessipris, K. Martinez, J. Cupitt |
| .SH SEE ALSO |
| im_mmapin(3), im_openin(3), im_openout(3), im_setbuf(3), im_open(3), |
| im_incheck(3), im_pincheck(3). |
| .SH AUTHOR |
| N. Dessipris \- 11/04/1990 |