FFmpeg  4.2.2
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 constants & data structures
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 #include "tiff_common.h"
35 
36 /** TIFF types in ascenting priority (last in the list is highest) */
37 enum TiffType {
38  /** TIFF image based on the TIFF 6.0 or TIFF/EP (ISO 12234-2) specifications */
40  /** Digital Negative (DNG) image */
42  /** Digital Negative (DNG) image part of an CinemaDNG image sequence */
44 };
45 
46 /** abridged list of TIFF and TIFF/EP tags */
47 enum TiffTags {
48  TIFF_SUBFILE = 0xfe,
49  TIFF_WIDTH = 0x100,
54  TIFF_FILL_ORDER = 0x10A,
57  TIFF_MAKE = 0x10F,
58  TIFF_MODEL = 0x110,
59  TIFF_STRIP_OFFS = 0x111,
63  TIFF_XRES = 0x11A,
64  TIFF_YRES = 0x11B,
65  TIFF_PLANAR = 0x11C,
66  TIFF_PAGE_NAME = 0x11D,
67  TIFF_XPOS = 0x11E,
68  TIFF_YPOS = 0x11F,
69  TIFF_T4OPTIONS = 0x124,
71  TIFF_RES_UNIT = 0x128,
74  TIFF_DATE = 0x132,
75  TIFF_ARTIST = 0x13B,
77  TIFF_PREDICTOR = 0x13D,
78  TIFF_PAL = 0x140,
79  TIFF_TILE_WIDTH = 0x142,
83  TIFF_SUB_IFDS = 0x14A,
90  TIFF_CFA_PATTERN = 0x828E,
91  TIFF_COPYRIGHT = 0x8298,
98 };
99 
100 /** abridged list of DNG tags */
101 enum DngTags {
102  DNG_VERSION = 0xC612,
104  DNG_WHITE_LEVEL = 0xC61D,
105 };
106 
107 /** list of CinemaDNG tags */
114 };
115 
116 /** list of TIFF, TIFF/EP and DNG compression types */
117 enum TiffCompr {
118  TIFF_RAW = 1,
126  TIFF_PACKBITS = 0x8005,
127  TIFF_DEFLATE = 0x80B2,
128  TIFF_LZMA = 0x886D,
129 };
130 
177 };
178 
179 /** list of TIFF, TIFF/AP and DNG PhotometricInterpretation (TIFF_PHOTOMETRIC) values */
182  TIFF_PHOTOMETRIC_WHITE_IS_ZERO, /* mono or grayscale, 0 is white */
183  TIFF_PHOTOMETRIC_BLACK_IS_ZERO, /* mono or grayscale, 0 is black */
184  TIFF_PHOTOMETRIC_RGB, /* RGB or RGBA*/
185  TIFF_PHOTOMETRIC_PALETTE, /* Uses a palette */
186  TIFF_PHOTOMETRIC_ALPHA_MASK, /* Transparency mask */
187  TIFF_PHOTOMETRIC_SEPARATED, /* CMYK or some other ink set */
189  TIFF_PHOTOMETRIC_CIE_LAB = 8, /* 1976 CIE L*a*b* */
190  TIFF_PHOTOMETRIC_ICC_LAB, /* ICC L*a*b* */
191  TIFF_PHOTOMETRIC_ITU_LAB, /* ITU L*a*b* */
192  TIFF_PHOTOMETRIC_CFA = 32803, /* Color Filter Array (TIFF/AP and DNG) */
193  TIFF_PHOTOMETRIC_LOG_L = 32844, /* CIE Log2(L) */
194  TIFF_PHOTOMETRIC_LOG_LUV, /* CIE Log L*u*v* */
195  TIFF_PHOTOMETRIC_LINEAR_RAW = 34892, /* Linear Raw (DNG) */
196 };
197 
200  GEOTIFF_DOUBLE = 34736,
202 };
203 
204 typedef struct TiffGeoTag {
207  int count;
208  int offset;
209  char *val;
210 } TiffGeoTag;
211 
212 typedef struct TiffGeoTagKeyName {
213  const enum TiffGeoTagKey key;
214  const char *const name;
216 
217 typedef struct TiffGeoTagNameType {
218  const char *const name;
219  const enum TiffGeoTagType type;
221 
222 #endif /* AVCODEC_TIFF_H */
Definition: tiff.h:64
TIFF Common Routines.
Definition: tiff.h:118
int offset
Definition: tiff.h:208
TiffPhotometric
list of TIFF, TIFF/AP and DNG PhotometricInterpretation (TIFF_PHOTOMETRIC) values ...
Definition: tiff.h:180
Definition: tiff.h:63
const char *const name
Definition: tiff.h:214
Definition: tiff.h:57
Definition: tiff.h:122
Definition: tiff.h:121
char * val
Definition: tiff.h:209
Definition: tiff.h:78
enum TiffGeoTagKey key
Definition: tiff.h:205
TiffGeoTagKey
Definition: tiff.h:131
TIFF image based on the TIFF 6.0 or TIFF/EP (ISO 12234-2) specifications.
Definition: tiff.h:39
TiffType
TIFF types in ascenting priority (last in the list is highest)
Definition: tiff.h:37
Definition: tiff.h:51
TiffCompr
list of TIFF, TIFF/EP and DNG compression types
Definition: tiff.h:117
TiffGeoTagType
Definition: tiff.h:198
Definition: tiff.h:120
CinemaDngTags
list of CinemaDNG tags
Definition: tiff.h:108
Digital Negative (DNG) image part of an CinemaDNG image sequence.
Definition: tiff.h:43
int count
Definition: tiff.h:207
enum TiffTags type
Definition: tiff.h:206
Definition: tiff.h:68
Digital Negative (DNG) image.
Definition: tiff.h:41
const char *const name
Definition: tiff.h:218
Definition: tiff.h:74
TiffTags
abridged list of TIFF and TIFF/EP tags
Definition: tiff.h:47
DngTags
abridged list of DNG tags
Definition: tiff.h:101
Definition: tiff.h:67