GDAL

gdalexif.h
1/******************************************************************************
2 * $Id$
3 *
4 * Project: JPEG JFIF Driver
5 * Purpose: Implement GDAL JPEG Support based on IJG libjpeg.
6 * Author: Frank Warmerdam, warmerdam@pobox.com
7 *
8 ******************************************************************************
9 * Copyright (c) 2000, Frank Warmerdam
10 * Copyright (c) 2017, Even Rouault
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 ****************************************************************************/
30
32
33typedef enum
34{
35 TIFF_NOTYPE = 0, /* placeholder */
36 TIFF_BYTE = 1, /* 8-bit unsigned integer */
37 TIFF_ASCII = 2, /* 8-bit bytes w/ last byte null */
38 TIFF_SHORT = 3, /* 16-bit unsigned integer */
39 TIFF_LONG = 4, /* 32-bit unsigned integer */
40 TIFF_RATIONAL = 5, /* 64-bit unsigned fraction */
41 TIFF_SBYTE = 6, /* !8-bit signed integer */
42 TIFF_UNDEFINED = 7, /* !8-bit untyped data */
43 TIFF_SSHORT = 8, /* !16-bit signed integer */
44 TIFF_SLONG = 9, /* !32-bit signed integer */
45 TIFF_SRATIONAL = 10, /* !64-bit signed fraction */
46 TIFF_FLOAT = 11, /* !32-bit IEEE floating point */
47 TIFF_DOUBLE = 12, /* !64-bit IEEE floating point */
48 TIFF_IFD = 13 /* %32-bit unsigned integer (offset) */
49} GDALEXIFTIFFDataType;
50
51/*
52 * TIFF Image File Directories are comprised of a table of field
53 * descriptors of the form shown below. The table is sorted in
54 * ascending order by tag. The values associated with each entry are
55 * disjoint and may appear anywhere in the file (so long as they are
56 * placed on a word boundary).
57 *
58 * If the value is 4 bytes or less, then it is placed in the offset
59 * field to save space. If the value is less than 4 bytes, it is
60 * left-justified in the offset field.
61 */
62typedef struct
63{
64 GUInt16 tdir_tag; /* see below */
65 GUInt16 tdir_type; /* data type; see below */
66 GUInt32 tdir_count; /* number of items; length in spec */
67 GUInt32 tdir_offset; /* byte offset to field data */
68} GDALEXIFTIFFDirEntry;
69
70 GByte CPL_DLL *EXIFCreate(char **papszEXIFMetadata, GByte *pabyThumbnail,
71 GUInt32 nThumbnailSize, GUInt32 nThumbnailWidth,
72 GUInt32 nThumbnailHeight, GUInt32 *pnOutBufferSize);
73
GUInt32
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:177
GUInt16
unsigned short GUInt16
Unsigned int16 type.
Definition: cpl_port.h:183
GByte
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:185