FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tiff.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006 Konstantin Shishkov
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /**
22  * @file
23  * TIFF tables
24  *
25  * For more information about the TIFF format, check the official docs at:
26  * http://partners.adobe.com/public/developer/tiff/index.html
27  * @author Konstantin Shishkov
28  */
29 
30 #ifndef AVCODEC_TIFF_H
31 #define AVCODEC_TIFF_H
32 
33 #include <stdint.h>
34 
35 /** abridged list of TIFF tags */
36 enum TiffTags{
37  TIFF_SUBFILE = 0xfe,
38  TIFF_WIDTH = 0x100,
42  TIFF_INVERT = 0x106,
43  TIFF_FILL_ORDER = 0x10A,
46  TIFF_MAKE = 0x10F,
47  TIFF_MODEL = 0x110,
48  TIFF_STRIP_OFFS = 0x111,
52  TIFF_XRES = 0x11A,
53  TIFF_YRES = 0x11B,
54  TIFF_PLANAR = 0x11C,
55  TIFF_PAGE_NAME = 0x11D,
56  TIFF_XPOS = 0x11E,
57  TIFF_YPOS = 0x11F,
58  TIFF_T4OPTIONS = 0x124,
60  TIFF_RES_UNIT = 0x128,
63  TIFF_DATE = 0x132,
64  TIFF_ARTIST = 0x13B,
66  TIFF_PREDICTOR = 0x13D,
67  TIFF_PAL = 0x140,
68  TIFF_TILE_WIDTH = 0x142,
77  TIFF_COPYRIGHT = 0x8298,
84 };
85 
86 /** list of TIFF compression types */
87 enum TiffCompr{
88  TIFF_RAW = 1,
96  TIFF_PACKBITS = 0x8005,
97  TIFF_DEFLATE = 0x80B2
98 };
99 
114 };
115 
162 };
163 
166  GEOTIFF_DOUBLE = 34736,
168 };
169 
170 /** sizes of various TIFF field types (string size = 100)*/
171 static const uint8_t type_sizes[14] = {
172  0, 1, 100, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 4
173 };
174 
175 typedef struct TiffGeoTag {
178  int count;
179  int offset;
180  char *val;
181 } TiffGeoTag;
182 
183 typedef struct TiffGeoTagKeyName {
184  const enum TiffGeoTagKey key;
185  const char *const name;
187 
188 typedef struct TiffGeoTagNameType {
189  const char *const name;
190  const enum TiffGeoTagType type;
192 
193 #endif /* AVCODEC_TIFF_H */