4
#include "TiffParserException.h"
8
RawSpeed - RAW file decoder.
10
Copyright (C) 2009 Klaus Post
12
This library is free software; you can redistribute it and/or
13
modify it under the terms of the GNU Lesser General Public
14
License as published by the Free Software Foundation; either
15
version 2 of the License, or (at your option) any later version.
17
This library is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
Lesser General Public License for more details.
22
You should have received a copy of the GNU Lesser General Public
23
License along with this library; if not, write to the Free Software
24
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26
http://www.klauspost.com
31
const uint32 datasizes[] = {0,1,1,2,4,8,1,1,2,4, 8, 4, 8, 4};
32
// 0-1-2-3-4-5-6-7-8-9-10-11-12-13
33
const uint32 datashifts[] = {0,0,0,1,2,3,0,0,1,2, 3, 2, 3, 2};
39
#define CHECKSIZE(A) if (A >= f->getSize() || A < 1) throw TiffParserException("Error reading TIFF Entry structure size. File Corrupt")
41
// 0-1-2-3-4-5-6-7-8-9-10-11-12-13
43
* Tag data type information.
45
* Note: RATIONALs are the ratio of two 32-bit integer values.
48
TIFF_NOTYPE = 0, /* placeholder */
49
TIFF_BYTE = 1, /* 8-bit unsigned integer */
50
TIFF_ASCII = 2, /* 8-bit bytes w/ last byte null */
51
TIFF_SHORT = 3, /* 16-bit unsigned integer */
52
TIFF_LONG = 4, /* 32-bit unsigned integer */
53
TIFF_RATIONAL = 5, /* 64-bit unsigned fraction */
54
TIFF_SBYTE = 6, /* !8-bit signed integer */
55
TIFF_UNDEFINED = 7, /* !8-bit untyped data */
56
TIFF_SSHORT = 8, /* !16-bit signed integer */
57
TIFF_SLONG = 9, /* !32-bit signed integer */
58
TIFF_SRATIONAL = 10, /* !64-bit signed fraction */
59
TIFF_FLOAT = 11, /* !32-bit IEEE floating point */
60
TIFF_DOUBLE = 12 /* !64-bit IEEE floating point */
68
TiffEntry(FileMap* f, uint32 offset);
69
virtual ~TiffEntry(void);
70
virtual uint32 getInt();
72
virtual ushort16 getShort();
73
virtual const uint32* getIntArray();
74
virtual const ushort16* getShortArray();
77
const uchar8* getData() {return data;};
79
int getElementShift();
84
uint32 getDataOffset() const { return data_offset; }
96
} // namespace RawSpeed