FFmpeg
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,
95  TIFF_ICC_PROFILE = 0x8773,
99 };
100 
101 /** abridged list of DNG tags */
102 enum DngTags {
103  DNG_VERSION = 0xC612,
106  DNG_BLACK_LEVEL = 0xC61A,
107  DNG_WHITE_LEVEL = 0xC61D,
108 };
109 
110 /** list of CinemaDNG tags */
117 };
118 
119 /** list of TIFF, TIFF/EP and DNG compression types */
120 enum TiffCompr {
121  TIFF_RAW = 1,
129  TIFF_PACKBITS = 0x8005,
130  TIFF_DEFLATE = 0x80B2,
131  TIFF_LZMA = 0x886D,
132 };
133 
180 };
181 
182 /** list of TIFF, TIFF/AP and DNG PhotometricInterpretation (TIFF_PHOTOMETRIC) values */
185  TIFF_PHOTOMETRIC_WHITE_IS_ZERO, /* mono or grayscale, 0 is white */
186  TIFF_PHOTOMETRIC_BLACK_IS_ZERO, /* mono or grayscale, 0 is black */
187  TIFF_PHOTOMETRIC_RGB, /* RGB or RGBA*/
188  TIFF_PHOTOMETRIC_PALETTE, /* Uses a palette */
189  TIFF_PHOTOMETRIC_ALPHA_MASK, /* Transparency mask */
190  TIFF_PHOTOMETRIC_SEPARATED, /* CMYK or some other ink set */
192  TIFF_PHOTOMETRIC_CIE_LAB = 8, /* 1976 CIE L*a*b* */
193  TIFF_PHOTOMETRIC_ICC_LAB, /* ICC L*a*b* */
194  TIFF_PHOTOMETRIC_ITU_LAB, /* ITU L*a*b* */
195  TIFF_PHOTOMETRIC_CFA = 32803, /* Color Filter Array (TIFF/AP and DNG) */
196  TIFF_PHOTOMETRIC_LOG_L = 32844, /* CIE Log2(L) */
197  TIFF_PHOTOMETRIC_LOG_LUV, /* CIE Log L*u*v* */
198  TIFF_PHOTOMETRIC_LINEAR_RAW = 34892, /* Linear Raw (DNG) */
199 };
200 
203  GEOTIFF_DOUBLE = 34736,
205 };
206 
207 typedef struct TiffGeoTag {
210  int count;
211  int offset;
212  char *val;
213 } TiffGeoTag;
214 
215 typedef struct TiffGeoTagKeyName {
216  const enum TiffGeoTagKey key;
217  const char *const name;
219 
220 typedef struct TiffGeoTagNameType {
221  const char *const name;
222  const enum TiffGeoTagType type;
224 
225 #endif /* AVCODEC_TIFF_H */
Definition: tiff.h:64
TIFF Common Routines.
Definition: tiff.h:121
int offset
Definition: tiff.h:211
TiffPhotometric
list of TIFF, TIFF/AP and DNG PhotometricInterpretation (TIFF_PHOTOMETRIC) values ...
Definition: tiff.h:183
Definition: tiff.h:63
const char *const name
Definition: tiff.h:217
Definition: tiff.h:57
Definition: tiff.h:125
Definition: tiff.h:124
char * val
Definition: tiff.h:212
Definition: tiff.h:78
enum TiffGeoTagKey key
Definition: tiff.h:208
TiffGeoTagKey
Definition: tiff.h:134
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:120
TiffGeoTagType
Definition: tiff.h:201
Definition: tiff.h:123
CinemaDngTags
list of CinemaDNG tags
Definition: tiff.h:111
Digital Negative (DNG) image part of an CinemaDNG image sequence.
Definition: tiff.h:43
int count
Definition: tiff.h:210
enum TiffTags type
Definition: tiff.h:209
Definition: tiff.h:68
Digital Negative (DNG) image.
Definition: tiff.h:41
const char *const name
Definition: tiff.h:221
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:102
Definition: tiff.h:67