summaryrefslogtreecommitdiff
path: root/man/TIFFquery.3t
blob: 26beeec00c4d07828b3baef6082064e362635563 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.\" $Header: /usr/local/cvs/internal/libtiff/man/TIFFquery.3t,v 1.1.1.1 1999/07/27 21:50:27 mike Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and 
.\" its documentation for any purpose is hereby granted without fee, provided
.\" that (i) the above copyright notices and this permission notice appear in
.\" all copies of the software and related documentation, and (ii) the names of
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
.\" publicity relating to the software without the specific, prior written
.\" permission of Sam Leffler and Silicon Graphics.
.\" 
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
.\" 
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
.TH QUERY 3T "October 15, 1995"
.SH NAME
TIFFCurrentRow,
TIFFCurrentStrip,
TIFFCurrentTile,
TIFFCurrentDirectory,
TIFFLastDirectory,
TIFFFileno,
TIFFFileName,
TIFFGetMode,
TIFFIsTiled,
TIFFIsByteSwapped,
TIFFIsUpSampled,
TIFFIsMSB2LSB
\- query routines
.SH SYNOPSIS
.nf
.B "#include <tiffio.h>"
.B "uint32 TIFFCurrentRow(TIFF* tif)"
.B "tstrip_t TIFFCurrentStrip(TIFF* tif)"
.B "ttile_t TIFFCurrentTile(TIFF* tif)"
.B "tdir_t TIFFCurrentDirectory(TIFF* tif)"
.B "int TIFFLastDirectory(TIFF* tif)"
.B "int TIFFFileno(TIFF* tif)"
.B "char* TIFFFileName(TIFF* tif)"
.B "int TIFFGetMode(TIFF* tif)"
.B "int TIFFIsTiled(TIFF* tif)"
.B "int TIFFIsByteSwapped(TIFF* tif)"
.B "int TIFFIsUpSampled(TIFF* tif)"
.B "int TIFFIsMSB2LSB(TIFF* tif)"
.B "const char* TIFFGetVersion(void)"
.fi
.SH DESCRIPTION
The following routines return status information about an open
.SM TIFF
file.
.PP
.IR TIFFCurrentDirectory
returns the index of the current directory (directories
are numbered starting at 0).
This number is suitable for use with the
.IR TIFFSetDirectory
routine.
.PP
.IR TIFFLastDirectory
returns a non-zero value if the current directory is the
last directory in the file;
otherwise zero is returned.
.PP
.IR TIFFCurrentRow ,
.IR TIFFCurrentStrip ,
and
.IR TIFFCurrentTile ,
return the current row, strip, and tile, respectively,
that is being read or written.
These values are updated each time a read or write is done.
.PP
.IR TIFFFileno
returns the underlying file descriptor used to access the 
.SM TIFF
image in the filesystem.
.PP
.IR TIFFFileName
returns the pathname argument passed to
.IR TIFFOpen
or
.IR TIFFFdOpen .
.PP
.IR TIFFGetMode
returns the mode with which the underlying file was opened.
On
.SM UNIX
systems, this is the value passed to the
.IR open (2)
system call.
.PP
.IR TIFFIsTiled
returns a non-zero value if the image data has
a tiled organization.
Zero is returned if the image data is organized in strips.
.PP
.IR TIFFIsByteSwapped
returns a non-zero value if the image data was in a different
byte-order than the host machine.
Zero is returned if the image data and local host byte-orders
are the same.
Data samples that are more than 8 bits wide must be byte-swapped
by the application.
.PP
.I TIFFIsUpSampled
returns a non-zero value if image data returned through the
read interface routines is being up-sampled.
This can be useful to applications that want to calculate
I/O buffer sizes to reflect this usage (though the usual
strip and tile size routines already do this).
.PP
.I TIFFIsMSB2LSB
returns a non-zero value if the image data is being returned with
bit 0 as the most significant bit.
.PP
.IR TIFFGetVersion
returns an
.SM ASCII
string that has a version stamp for the 
.SM TIFF
library software.
.SH DIAGNOSTICS
None.
.SH "SEE ALSO"
.IR libtiff (3T),
.IR TIFFOpen (3T),
.IR TIFFFdOpen (3T)