Debian Codegraph @

texk/xdvipsk/thirdparty/libtiff/doc/functions/TIFFClose.rst

raw
1 TIFFClose
2 ==========
3
4 Synopsis
5 --------
6
7 .. highlight:: c
8
9 ::
10
11 #include <tiffio.h>
12
13 .. c:function:: void TIFFClose(TIFF* tif)
14
15 .. c:function:: void TIFFCleanup(TIFF* tif)
16
17 Description
18 -----------
19
20 :c:func:`TIFFClose` closes a file that was previously opened with
21 :c:func:`TIFFOpen`. Any buffered data are flushed to the file, including
22 the contents of the current directory (if modified); and all resources
23 are reclaimed. :c:func:`TIFFClose` calls :c:func:`TIFFCleanup` and then
24 the associated function to close the file handle.
25
26 :c:func:`TIFFCleanup` is an auxiliary function to free the TIFF structure.
27 The given structure will be completely freed, so you should save opened file
28 handle and pointer to the close procedure in external variables before
29 calling :c:func:`TIFFCleanup`, if you will need these ones to close the file.
30 :c:func:`TIFFCleanup` calls :c:func:`TIFFFlush`, which stores all pending data
31 in the file.
32
33 .. note::
34 Both functions have no return value.
35 If you want to check whether the data has been successfully written
36 to the file, you can call :c:func:`TIFFFlush`, which has a return value,
37 before :c:func:`TIFFClose`.
38
39
40 Diagnostics
41 -----------
42
43 All error messages are directed to the :c:func:`TIFFErrorExtR` routine.
44 Likewise, warning messages are directed to the :c:func:`TIFFWarningExtR` routine.
45
46 See also
47 --------
48
49 :doc:`libtiff` (3tiff),
50 :doc:`TIFFOpen` (3tiff),
51 :doc:`TIFFError` (3tiff)