GDAL
gdalexif.h
1/******************************************************************************
2 *
3 * Project: JPEG JFIF Driver
4 * Purpose: Implement GDAL JPEG Support based on IJG libjpeg.
5 * Author: Frank Warmerdam, warmerdam@pobox.com
6 *
7 ******************************************************************************
8 * Copyright (c) 2000, Frank Warmerdam
9 * Copyright (c) 2017, Even Rouault
10 *
11 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#include "cpl_conv.h"
15
17
18typedef enum
19{
20 TIFF_NOTYPE = 0, /* placeholder */
21 TIFF_BYTE = 1, /* 8-bit unsigned integer */
22 TIFF_ASCII = 2, /* 8-bit bytes w/ last byte null */
23 TIFF_SHORT = 3, /* 16-bit unsigned integer */
24 TIFF_LONG = 4, /* 32-bit unsigned integer */
25 TIFF_RATIONAL = 5, /* 64-bit unsigned fraction */
26 TIFF_SBYTE = 6, /* !8-bit signed integer */
27 TIFF_UNDEFINED = 7, /* !8-bit untyped data */
28 TIFF_SSHORT = 8, /* !16-bit signed integer */
29 TIFF_SLONG = 9, /* !32-bit signed integer */
30 TIFF_SRATIONAL = 10, /* !64-bit signed fraction */
31 TIFF_FLOAT = 11, /* !32-bit IEEE floating point */
32 TIFF_DOUBLE = 12, /* !64-bit IEEE floating point */
33 TIFF_IFD = 13 /* %32-bit unsigned integer (offset) */
34} GDALEXIFTIFFDataType;
35
36/*
37 * TIFF Image File Directories are comprised of a table of field
38 * descriptors of the form shown below. The table is sorted in
39 * ascending order by tag. The values associated with each entry are
40 * disjoint and may appear anywhere in the file (so long as they are
41 * placed on a word boundary).
42 *
43 * If the value is 4 bytes or less, then it is placed in the offset
44 * field to save space. If the value is less than 4 bytes, it is
45 * left-justified in the offset field.
46 */
47typedef struct
48{
49 GUInt16 tdir_tag; /* see below */
50 GUInt16 tdir_type; /* data type; see below */
51 GUInt32 tdir_count; /* number of items; length in spec */
52 GUInt32 tdir_offset; /* byte offset to field data */
53} GDALEXIFTIFFDirEntry;
54
55GByte CPL_DLL *EXIFCreate(char **papszEXIFMetadata, GByte *pabyThumbnail,
56 GUInt32 nThumbnailSize, GUInt32 nThumbnailWidth,
57 GUInt32 nThumbnailHeight, GUInt32 *pnOutBufferSize);
58
Various convenience functions for CPL.
unsigned int GUInt32
Unsigned int32 type.
Definition cpl_port.h:167
unsigned short GUInt16
Unsigned int16 type.
Definition cpl_port.h:173
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:175