LibTIFF Coverage of the TIFF 6.0 Specification¶
The library is capable of dealing with images that are written to follow the 5.0 or 6.0 TIFF spec. There is also considerable support for some of the more esoteric portions of the 6.0 TIFF spec.
Baseline¶
Core requirements |
Both Tags handled: |
Tiled Images |
|
Image Colorimetry Information |
|
Class B for bilevel images |
|
Class G for grayscale images |
|
Class P for palette color images |
|
Class R for RGB full color images |
|
Class F for facsimile |
(Class B tags plus…)
|
Class S for separated images |
|
Class Y for YCbCr images |
(colorimetry info from Appendix H; see above) |
Class “JPEG” for JPEG images (per TTN2) |
(Class Y tags if YCbCr) (Class S tags if CMYK)
|
In addition, the library supports some optional compression algorithms that are, in some cases, of dubious value.
Compression tag value |
Compression algorithm |
---|---|
32766 |
NeXT 2-bit encoding |
32809 |
ThunderScan 4-bit encoding |
32909 |
Pixar companded 11-bit ZIP encoding |
32946 |
PKZIP-style Deflate encoding (experimental) |
34676 |
SGI 32-bit Log Luminance encoding (experimental) |
34677 |
SGI 24-bit Log Luminance encoding (experimental) |
Note that there is no support for the JPEG-related tags defined in the 6.0 specification; the JPEG support is based on the post-6.0 proposal given in TIFF Technical Note #2.
Note
For more information on the experimental Log Luminance encoding consult the materials available at http://www.anyhere.com/gward/pixformat/tiffluv.html.
The following table shows the tags that are recognized and how they are used by the library. If no use is indicated, then the library reads and writes the tag, but does not use it internally. For the meaning of the tags look in https://www.awaresystems.be/imaging/tiff/tifftags.html
libtiff
supports also many private tags allocated for organizations that wish to
store additional information in a TIFF file.
Tags for TIFF/EP and for Digital Negative (DNG) Specification 1.1.0
are included.
Note that some tags are meaningful only when a particular
compression scheme is being used; e.g. Group3Options
is only useful if Compression
is set to CCITT Group 3 encoding.
Tags of this sort are considered codec-specific
tags and the library does not recognize them except when the
Compression
tag has been previously set to the relevant compression scheme.
Tags Recognized by LibTIFF¶
Tag Name |
Value |
R/W< |
Library’s Use (Comments) |
---|---|---|---|
|
254 |
R/W |
none (also known as |
|
255 |
R/W |
parsed but ignored (also known as |
|
256 |
R/W |
lots |
|
257 |
R/W |
lots |
|
258 |
R/W |
lots |
|
259 |
R/W |
to select appropriate codec |
|
262 |
R/W |
lots |
|
263 |
R/W |
(tag in tif.h wrongly written as “Threshholding”) |
|
264 |
R/W |
|
|
265 |
R/W |
|
|
266 |
R/W |
control bit order |
|
269 |
R/W |
|
|
270 |
R/W |
|
|
271 |
R/W |
|
|
272 |
R/W |
|
|
273 |
R/W |
data i/o |
|
274 |
R/W |
|
|
277 |
R/W |
lots |
|
278 |
R/W |
data i/o |
|
279 |
R/W |
data i/o |
|
280 |
R/W |
|
|
281 |
R/W |
|
|
282 |
R/W |
|
|
283 |
R/W |
used by Group 3 2d encoder |
|
284 |
R/W |
data i/o |
|
285 |
R/W |
|
|
286 |
R/W |
|
|
287 |
R/W |
|
|
288 |
R/W |
parsed but ignored |
|
289 |
R/W |
parsed but ignored |
|
290 |
R/W |
parsed but ignored |
|
291 |
R/W |
parsed but ignored |
|
296 |
R/W |
used by Group 3 2d encoder |
|
297 |
R/W |
|
|
300 |
R/W |
parsed but ignored |
|
301 |
R/W |
|
|
305 |
R/W |
|
|
306 |
R/W |
|
|
315 |
R/W |
|
|
316 |
R/W |
|
|
318 |
R/W |
|
|
319 |
R/W |
|
|
320 |
R/W |
|
|
321 |
R/W |
|
|
322 |
R/W |
data i/o |
|
323 |
R/W |
data i/o |
|
324 |
R/W |
data i/o |
|
325 |
R/W |
data i/o |
|
330 |
R/W |
subimage descriptor support |
|
332 |
R/W |
|
|
333 |
R/W |
|
|
334 |
R/W |
|
|
336 |
R/W |
|
|
337 |
R/W |
|
|
338 |
R/W |
lots |
|
339 |
R/W |
|
|
340 |
R/W |
|
|
341 |
R/W |
|
|
343 |
R/W |
|
|
344 |
R/W |
|
|
345 |
R/W |
|
|
529 |
R/W |
used by |
|
530 |
R/W |
tile / strip size calculations |
|
531 |
R/W |
|
|
532 |
R/W |
|
|
700 |
R/W |
|
|
32995 |
R |
none (obsoleted by |
|
32996 |
R |
none (obsoleted by |
|
32997 |
R/W |
tile / strip size calculations |
|
32998 |
R/W |
tile / strip size calculations |
|
33300 |
R/W |
|
|
33301 |
R/W |
|
|
33302 |
R/W |
|
|
33303 |
R/W |
|
|
33304 |
R/W |
|
|
33305 |
R/W |
|
|
33306 |
R/W |
|
|
33432 |
R/W |
|
|
33723 |
R/W |
(also known as TIFF/EP IPTC/NAA;
|
|
34377 |
R/W |
|
|
34665 |
R/W |
|
|
34675 |
R/W |
|
|
34853 |
R/W |
|
|
34908 |
R/W |
|
|
34909 |
R/W |
|
|
34910 |
R/W |
|
|
34911 |
R/W |
|
|
37439 |
R/W |
|
|
37724 |
R/W |
|
|
40965 |
R/W |
|
|
50706 |
R/W |
DNG 1.0 tags |
|
50707 |
R/W |
|
|
50708 |
R/W |
|
|
50709 |
R/W |
|
|
50710 |
R/W |
|
|
50711 |
R/W |
|
|
50712 |
R/W |
|
|
50713 |
R/W |
|
|
50714 |
R/W |
|
|
50715 |
R/W |
|
|
50716 |
R/W |
|
|
50717 |
R/W |
|
|
50718 |
R/W |
|
|
50719 |
R/W |
|
|
50720 |
R/W |
|
|
50721 |
R/W |
|
|
50722 |
R/W |
|
|
50723 |
R/W |
|
|
50724 |
R/W |
|
|
50725 |
R/W |
|
|
50726 |
R/W |
|
|
50727 |
R/W |
|
|
50728 |
R/W |
|
|
50729 |
R/W |
|
|
50730 |
R/W |
|
|
50731 |
R/W |
|
|
50732 |
R/W |
|
|
50733 |
R/W |
|
|
50734 |
R/W |
|
|
50735 |
R/W |
|
|
50736 |
R/W |
|
|
50737 |
R/W |
|
|
50738 |
R/W |
|
|
50739 |
R/W |
|
|
50740 |
R/W |
|
|
50741 |
R/W |
|
|
50778 |
R/W |
|
|
50779 |
R/W |
|
|
50780 |
R/W |
|
|
50781 |
R/W |
|
|
50827 |
R/W |
|
|
50828 |
R/W |
|
|
50829 |
R/W |
|
|
50830 |
R/W |
|
|
50831 |
R/W |
|
|
50832 |
R/W |
|
|
50833 |
R/W |
|
|
50834 |
R/W |
|
|
65563 |
R/W |
(only internal pseudo tag) |
|
346 |
R/W |
TIFF/FX tags |
|
400 |
R/W |
|
|
401 |
R/W |
|
|
402 |
R/W |
|
|
403 |
R/W |
|
|
404 |
R/W |
|
|
405 |
R/W |
|
|
433 |
R/W |
|
|
434 |
R/W |
|
|
435 |
R/W |
|
|
559 |
R/W |
part of RFC 2301 for fax |
|
34732 |
R/W |
The Matteing
and DataType
tags have been obsoleted by the 6.0
ExtraSamples
and SampleFormat
tags.
Consult the documentation on the
ExtraSamples
tag and Associated Alpha for elaboration. Note however
that if you use Associated Alpha, you are expected to save data that is
pre-multipled by Alpha. If this means nothing to you, check out
Porter & Duff’s paper in the ‘84 SIGGRAPH proceedings: “Compositing Digital
Images”.
Tag RichTIFFIPTC
(33723) is defined wrongly in TIFF/EP definition as “LONG or ASCII”.
libtiff
defines it as “UNDEFINED or BYTE”.
The ImageDepth
tag is a non-standard, but registered tag that specifies
the Z-dimension of volumetric data. The combination of ImageWidth
,
ImageLength
, and ImageDepth
,
defines a 3D volume of pixels that are
further specified by BitsPerSample
and
SamplesPerPixel
. The TileDepth
tag (also non-standard, but registered) can be used to specified a
subvolume “tiling” of a volume of data.
The Colorimetry, and CMYK tags are additions that appear in TIFF 6.0. Consult the TIFF 6.0 specification and TIFF File Format Specification.
Codecs / Compression¶
The following tags are used by codecs.
Tag Name |
Value |
R/W< |
Library’s Use (Comments) |
---|---|---|---|
|
317 |
R/W |
LZW codec |
|
347 |
R/W |
JPEG |
|
513 |
R/W |
OJPEG |
|
514 |
R/W |
OJPEG |
|
519 |
R/W |
OJPEG |
|
520 |
R/W |
OJPEG |
|
521 |
R/W |
OJPEG |
|
512 |
R/W |
OJPEG |
|
515 |
R/W |
OJPEG |
|
326 |
R/W |
CCITT / fax |
|
327 |
R/W |
CCITT / fax |
|
328 |
R/W |
CCITT / fax |
|
292 |
R/W |
CCITT / fax |
|
293 |
R/W |
CCITT / fax |
|
50674 |
R/W |
LERC |
Note: This codec-specific
tags and the library does not recognize them except when the
Compression
tag has been previously set to the relevant compression scheme.
The JPEG-related tag is specified in DRAFT TIFF Technical Note #2, which defines a revised JPEG-in-TIFF scheme (revised over the appendix that was part of the TIFF 6.0 specification).
EXIF / GPS Custom IFDs¶
In addition to the standard TIFF tags, libtiff
has predefined IFDs
(image file directories) with the tags for EXIF (version 2.32) and EXIF-GPS
as custom directories.
For reading / writing of this IFDs refer to TIFFCustomDirectory.
EXIF Custom Tags¶
Tag Name |
Value |
R/W< |
Library’s Use (Comments) |
---|---|---|---|
|
33434 |
R/W |
|
|
33437 |
R/W |
|
|
34850 |
R/W |
|
|
34852 |
R/W |
|
|
34855 |
R/W |
After EXIF 2.2.1 ISOSpeedRatings is named |
|
34856 |
R/W |
|
|
34864 |
R/W |
|
|
34865 |
R/W |
|
|
34866 |
R/W |
|
|
34867 |
R/W |
|
|
34868 |
R/W |
|
|
34869 |
R/W |
|
|
36864 |
R/W |
|
|
36867 |
R/W |
|
|
36868 |
R/W |
|
|
36880 |
R/W |
|
|
36881 |
R/W |
|
|
36882 |
R/W |
|
|
37121 |
R/W |
|
|
37122 |
R/W |
|
|
37377 |
R/W |
|
|
37378 |
R/W |
|
|
37379 |
R/W |
|
|
37380 |
R/W |
|
|
37381 |
R/W |
|
|
37382 |
R/W |
|
|
37383 |
R/W |
|
|
37384 |
R/W |
|
|
37385 |
R/W |
|
|
37386 |
R/W |
|
|
37396 |
R/W |
|
|
37500 |
R/W |
|
|
37510 |
R/W |
|
|
37520 |
R/W |
|
|
37521 |
R/W |
|
|
37522 |
R/W |
|
|
37888 |
R/W |
|
|
37889 |
R/W |
|
|
37890 |
R/W |
|
|
37891 |
R/W |
|
|
37892 |
R/W |
|
|
37893 |
R/W |
|
|
40960 |
R/W |
|
|
40961 |
R/W |
|
|
40962 |
R/W |
|
|
40963 |
R/W |
|
|
40964 |
R/W |
|
|
41483 |
R/W |
|
|
41484 |
R/W |
|
|
41486 |
R/W |
|
|
41487 |
R/W |
|
|
41488 |
R/W |
|
|
41492 |
R/W |
|
|
41493 |
R/W |
|
|
41495 |
R/W |
|
|
41728 |
R/W |
|
|
41729 |
R/W |
|
|
41730 |
R/W |
|
|
41985 |
R/W |
|
|
41986 |
R/W |
|
|
41987 |
R/W |
|
|
41988 |
R/W |
|
|
41989 |
R/W |
|
|
41990 |
R/W |
|
|
41991 |
R/W |
|
|
41992 |
R/W |
|
|
41993 |
R/W |
|
|
41994 |
R/W |
|
|
41995 |
R/W |
|
|
41996 |
R/W |
|
|
42016 |
R/W |
|
|
42032 |
R/W |
|
|
42033 |
R/W |
|
|
42034 |
R/W |
|
|
42035 |
R/W |
|
|
42036 |
R/W |
|
|
42037 |
R/W |
|
|
42240 |
R/W |
|
|
42080 |
R/W |
|
|
42081 |
R/W |
|
|
42082 |
R/W |
GPS Custom Tags¶
Tag Name |
Value |
R/W< |
Library’s Use (Comments) |
---|---|---|---|
|
0 |
R/W |
|
|
1 |
R/W |
|
|
2 |
R/W |
|
|
3 |
R/W |
|
|
4 |
R/W |
|
|
5 |
R/W |
|
|
6 |
R/W |
|
|
7 |
R/W |
|
|
8 |
R/W |
|
|
9 |
R/W |
|
|
10 |
R/W |
|
|
11 |
R/W |
|
|
12 |
R/W |
|
|
13 |
R/W |
|
|
14 |
R/W |
|
|
15 |
R/W |
|
|
16 |
R/W |
|
|
17 |
R/W |
|
|
18 |
R/W |
|
|
19 |
R/W |
|
|
20 |
R/W |
|
|
21 |
R/W |
|
|
22 |
R/W |
|
|
23 |
R/W |
|
|
24 |
R/W |
|
|
25 |
R/W |
|
|
26 |
R/W |
|
|
27 |
R/W |
|
|
28 |
R/W |
|
|
29 |
R/W |
|
|
30 |
R/W |
|
|
31 |
R/W |