diff options
author | Frank Warmerdam <warmerdam@pobox.com> | 2011-02-18 20:53:04 +0000 |
---|---|---|
committer | Frank Warmerdam <warmerdam@pobox.com> | 2011-02-18 20:53:04 +0000 |
commit | 82361dfa04e1be95c02bd3a81c8ec4815410f92a (patch) | |
tree | 620745233e685fd22e6cfa7a4426916ea14af497 /libtiff/tif_dir.h | |
parent | 29beec44d2483599f1a8cf5d8db18c3218b8ddba (diff) | |
download | libtiff-git-82361dfa04e1be95c02bd3a81c8ec4815410f92a.tar.gz |
implement optional support for deferred strip/tile offset/size loading
Diffstat (limited to 'libtiff/tif_dir.h')
-rw-r--r-- | libtiff/tif_dir.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h index e906fefa..6af5f3dc 100644 --- a/libtiff/tif_dir.h +++ b/libtiff/tif_dir.h @@ -1,4 +1,4 @@ -/* $Id: tif_dir.h,v 1.53 2011-01-24 21:06:31 olivier Exp $ */ +/* $Id: tif_dir.h,v 1.54 2011-02-18 20:53:05 fwarmerdam Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -37,6 +37,28 @@ typedef struct { } TIFFTagValue; /* + * TIFF Image File Directories are comprised of a table of field + * descriptors of the form shown below. The table is sorted in + * ascending order by tag. The values associated with each entry are + * disjoint and may appear anywhere in the file (so long as they are + * placed on a word boundary). + * + * If the value is 4 bytes or less, in ClassicTIFF, or 8 bytes or less in + * BigTIFF, then it is placed in the offset field to save space. If so, + * it is left-justified in the offset field. + */ +typedef struct { + uint16 tdir_tag; /* see below */ + uint16 tdir_type; /* data type; see below */ + uint64 tdir_count; /* number of items; length in spec */ + union { + uint16 toff_short; + uint32 toff_long; + uint64 toff_long8; + } tdir_offset; /* either offset or the data itself if fits */ +} TIFFDirEntry; + +/* * Internal format of a TIFF directory entry. */ typedef struct { @@ -76,6 +98,10 @@ typedef struct { uint64* td_stripoffset; uint64* td_stripbytecount; int td_stripbytecountsorted; /* is the bytecount array sorted ascending? */ +#if defined(DEFER_STRILE_LOAD) + TIFFDirEntry td_stripoffset_entry; /* for deferred loading */ + TIFFDirEntry td_stripbytecount_entry; /* for deferred loading */ +#endif uint16 td_nsubifd; uint64* td_subifd; /* YCbCr parameters */ @@ -232,6 +258,8 @@ extern const TIFFFieldArray* _TIFFGetExifFields(void); extern void _TIFFSetupFields(TIFF* tif, const TIFFFieldArray* infoarray); extern void _TIFFPrintFieldInfo(TIFF*, FILE*); +extern int _TIFFFillStriles(TIFF*); + typedef enum { tfiatImage, tfiatExif, |