FFmpeg
 All Data Structures Namespaces 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 #include "tiff_common.h"
35 
36 /** abridged list of TIFF tags */
37 enum TiffTags {
38  TIFF_SUBFILE = 0xfe,
39  TIFF_WIDTH = 0x100,
44  TIFF_FILL_ORDER = 0x10A,
47  TIFF_MAKE = 0x10F,
48  TIFF_MODEL = 0x110,
49  TIFF_STRIP_OFFS = 0x111,
53  TIFF_XRES = 0x11A,
54  TIFF_YRES = 0x11B,
55  TIFF_PLANAR = 0x11C,
56  TIFF_PAGE_NAME = 0x11D,
57  TIFF_XPOS = 0x11E,
58  TIFF_YPOS = 0x11F,
59  TIFF_T4OPTIONS = 0x124,
61  TIFF_RES_UNIT = 0x128,
64  TIFF_DATE = 0x132,
65  TIFF_ARTIST = 0x13B,
67  TIFF_PREDICTOR = 0x13D,
68  TIFF_PAL = 0x140,
69  TIFF_TILE_WIDTH = 0x142,
78  TIFF_COPYRIGHT = 0x8298,
85 };
86 
87 /** list of TIFF compression types */
88 enum TiffCompr {
89  TIFF_RAW = 1,
97  TIFF_PACKBITS = 0x8005,
98  TIFF_DEFLATE = 0x80B2,
99  TIFF_LZMA = 0x886D,
100 };
101 
148 };
149 
152  TIFF_PHOTOMETRIC_WHITE_IS_ZERO, /* mono or grayscale, 0 is white */
153  TIFF_PHOTOMETRIC_BLACK_IS_ZERO, /* mono or grayscale, 0 is black */
154  TIFF_PHOTOMETRIC_RGB, /* RGB or RGBA*/
155  TIFF_PHOTOMETRIC_PALETTE, /* Uses a palette */
156  TIFF_PHOTOMETRIC_ALPHA_MASK, /* Transparency mask */
157  TIFF_PHOTOMETRIC_SEPARATED, /* CMYK or some other ink set */
159  TIFF_PHOTOMETRIC_CIE_LAB = 8, /* 1976 CIE L*a*b* */
160  TIFF_PHOTOMETRIC_ICC_LAB, /* ICC L*a*b* */
161  TIFF_PHOTOMETRIC_ITU_LAB, /* ITU L*a*b* */
162  TIFF_PHOTOMETRIC_CFA = 32803, /* Color Filter Array (DNG) */
163  TIFF_PHOTOMETRIC_LOG_L = 32844, /* CIE Log2(L) */
164  TIFF_PHOTOMETRIC_LOG_LUV, /* CIE Log L*u*v* */
165  TIFF_PHOTOMETRIC_LINEAR_RAW = 34892, /* Linear Raw (DNG) */
166 };
167 
170  GEOTIFF_DOUBLE = 34736,
172 };
173 
174 typedef struct TiffGeoTag {
177  int count;
178  int offset;
179  char *val;
180 } TiffGeoTag;
181 
182 typedef struct TiffGeoTagKeyName {
183  const enum TiffGeoTagKey key;
184  const char *const name;
186 
187 typedef struct TiffGeoTagNameType {
188  const char *const name;
189  const enum TiffGeoTagType type;
191 
192 #endif /* AVCODEC_TIFF_H */
Definition: tiff.h:54
TIFF Common Routines.
Definition: tiff.h:89
int offset
Definition: tiff.h:178
TiffPhotometric
Definition: tiff.h:150
enum TiffGeoTagKey key
Definition: tiff.h:183
Definition: tiff.h:53
Definition: tiff.h:99
const char *const name
Definition: tiff.h:184
Definition: tiff.h:47
Definition: tiff.h:93
Definition: tiff.h:92
char * val
Definition: tiff.h:179
Definition: tiff.h:94
Definition: tiff.h:68
enum TiffGeoTagKey key
Definition: tiff.h:175
TiffGeoTagKey
Definition: tiff.h:102
Definition: tiff.h:41
TiffCompr
list of TIFF compression types
Definition: tiff.h:88
TiffGeoTagType
Definition: tiff.h:168
Definition: tiff.h:91
int count
Definition: tiff.h:177
enum TiffTags type
Definition: tiff.h:176
Definition: tiff.h:58
const char *const name
Definition: tiff.h:188
enum TiffGeoTagType type
Definition: tiff.h:189
Definition: tiff.h:64
TiffTags
abridged list of TIFF tags
Definition: tiff.h:37
Definition: tiff.h:57