Debian Codegraph @

texk/xdvipsk/thirdparty/libtiff/doc/tools/tiffgt.rst

raw
1 tiffgt
2 ======
3
4 .. program:: tiffgt
5
6 Synopsis
7 --------
8
9 **tiffgt** [ *options* ] *input.tif* …
10
11 Description
12 -----------
13
14 :program:`tiffgt` displays one or more images stored using the
15 Tag Image File Format, Revision 6.0.
16
17 :program:`tiffgt` correctly handles files with any of the following characteristics:
18
19 .. list-table:: Supported tag values
20 :widths: 5 20
21 :header-rows: 1
22
23 * - Tag
24 - Value
25
26 * - BitsPerSample
27 - 1, 2, 4, 8, 16
28 * - SamplesPerPixel
29 - 1, 3, 4 (the 4th sample is ignored)
30 * - PhotometricInterpretation
31 - 0 (min-is-white), 1 (min-is-black), 2 (RGB), 3 (palette), 6 (YCbCr)
32 * - PlanarConfiguration
33 - 1 (contiguous), 2 (separate)
34 * - Orientation
35 - 1 (top-left), 4 (bottom-left)
36
37 Data may be organized as strips or tiles and may be
38 compressed with any of the compression algorithms supported
39 by the :program:`libtiff` library.
40
41 For palette images (``PhotometricInterpretation=3``), :program:`tiffgt`
42 inspects the colormap values and assumes either 16-bit
43 or 8-bit values according to the maximum value.
44 That is, if no colormap entry greater than 255 is found,
45 :program:`tiffgt` assumes the colormap has only 8-bit values; otherwise
46 it assumes 16-bit values.
47 This inspection is done to handle old images written by
48 previous (incorrect) versions of
49 :program:`libtiff`.
50
51 :program:`tiffgt` can be used to display multiple images one-at-a-time.
52 The left mouse button switches the display to the first image in the
53 *next* file in the list of files specified on the command line.
54 The right mouse button switches to the first image in the
55 *previous* file in the list.
56 The middle mouse button causes the first image in the first file
57 specified on the command line to be displayed.
58 In addition the following keyboard commands are recognized:
59
60 .. list-table:: Action keys
61 :widths: 2 23
62 :header-rows: 1
63
64 * - Key
65 - Description
66
67 * - :kbd:`b`
68 - Use a ``PhotometricInterpretation``
69 of ``MinIsBlack`` in displaying the current image
70 * - :kbd:`l`
71 - Use a ``FillOrder`` of lsb-to-msb in decoding the current image
72 * - :kbd:`m`
73 - Use a ``FillOrder`` of msb-to-lsb in decoding the current image
74 * - :kbd:`c`
75 - Use a colormap visual to display the current image
76 * - :kbd:`r`
77 - Use a true color (24-bit RGB) visual to display the current image
78 * - :kbd:`w`
79 - Use a ``PhotometricInterpretation`` of ``MinIsWhite`` in displaying
80 the current image
81 * - :kbd:`W`
82 - Toggle (enable/disable) display of warning messages from the
83 TIFF library when decoding images
84 * - :kbd:`E`
85 - Toggle (enable/disable) display of error messages from the
86 TIFF library when decoding images.
87 * - :kbd:`z`
88 - Reset all parameters to their default settings (``FillOrder``,
89 ``PhotometricInterpretation``, handling of warnings and errors)
90 * - :kbd:`PageUp`
91 - Display the previous image in the current file or the last
92 image in the previous file
93 * - :kbd:`PageDown`
94 - Display the next image in the current file or the first image
95 in the next file
96 * - :kbd:`Home`
97 - Display the first image in the current file
98 * - :kbd:`End`
99 - Display the last image in the current file (unimplemented)
100
101 Options
102 -------
103
104 .. option:: -c
105
106 Force image display in a colormap window.
107
108 .. option:: -d
109
110 Specify an image to display by directory number.
111 By default the first image in the file is displayed.
112 Directories are numbered starting at zero.
113
114 .. option:: -e
115
116 Enable reporting of error messages from the TIFF library.
117 By default :program:`tiffgt` silently ignores images that cannot be read.
118
119 .. option:: -f
120
121 Force :program:`tiffgt` to run as a foreground process.
122 By default :program:`tiffgt` will place itself in the background once it
123 has opened the requested image file.
124
125 .. option:: -l
126
127 Force the presumed bit ordering to be LSB to MSB.
128
129 .. option:: -m
130
131 Force the presumed bit ordering to be MSB to LSB.
132
133
134 .. option:: -o
135
136 Specify an image to display by directory offset.
137 By default the first image in the file is displayed.
138 Directories offsets may be specified using C-style syntax;
139 i.e. a leading ``0x`` for hexadecimal and a leading ``0`` for octal.
140
141
142 .. option:: -p
143
144 Override the value of the ``PhotometricInterpretation``
145 tag; the parameter may be one of: ``miniswhite`` ,
146 ``minisblack``, ``rgb``, ``palette``, ``mask``,
147 ``separated``, ``ycbcr``, and ``cielab``.
148
149 .. option:: -r
150
151 Force image display in a full color window.
152
153 .. option:: -s
154
155 Stop on the first read error.
156 By default all errors in the input data are ignored and
157 :program:`tiffgt`
158 does it's best to display as much of an image as possible.
159
160 .. option:: -w
161
162 Enable reporting of warning messages from the TIFF library.
163 By default :program:`tiffgt`
164 ignores warning messages generated when reading an image.
165
166 .. option:: -v
167
168 Place information in the title bar describing
169 what type of window (full color or colormap) is being
170 used, the name of the input file, and the directory
171 index of the image (if non-zero).
172 By default, the window type is not shown in the title bar.
173
174 Bugs
175 ----
176
177 Images wider and taller than the display are silently truncated to avoid
178 crashing old versions of the window manager.
179
180 See also
181 --------
182
183 :doc:`tiffdump` (1),
184 :doc:`tiffinfo` (1),
185 :doc:`tiffcp` (1),
186 :doc:`/functions/libtiff` (3tiff)