|
kusano |
7d535a |
addtiffo 1.0
|
|
kusano |
7d535a |
============
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The addtiffo utility is used to add overview pyramids to an existing
|
|
kusano |
7d535a |
TIFF or GeoTIFF file. Some applications can take advantage of these
|
|
kusano |
7d535a |
overviews to accelerate overview display performance of large rasters.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
This release of addtiffo is primarily intended for compatibility testing
|
|
kusano |
7d535a |
with applications, and to see if there is interest in a cleaner release
|
|
kusano |
7d535a |
of the capability ... perhaps incorporation into the libtiff tools
|
|
kusano |
7d535a |
distribution.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Please feel free to contact me with questions, or problems.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
warmerda@home.com
|
|
kusano |
7d535a |
http://home.gdal.org/~warmerda/
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Usage
|
|
kusano |
7d535a |
-----
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Usage: addtiffo [-r {average/nearest} [-subifd]
|
|
kusano |
7d535a |
tiff_filename [resolution_reductions]
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Example:
|
|
kusano |
7d535a |
% addtiffo abc.tif 2 4 8 16
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The numeric arguments are the list of reduction factors to
|
|
kusano |
7d535a |
generate. In this example a 1/2, 1/4 1/8 and 1/16
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Limitations
|
|
kusano |
7d535a |
-----------
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
See tif_overview.cpp for up to date details.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Currently only images with bits_per_sample of a multiple of eight
|
|
kusano |
7d535a |
will work.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o The code will attempt to use the same kind of compression,
|
|
kusano |
7d535a |
photometric interpretation, and organization as the source image, but
|
|
kusano |
7d535a |
it doesn't copy geotiff tags to the reduced resolution images.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Reduced resolution overviews for multi-sample files will currently
|
|
kusano |
7d535a |
always be generated as PLANARCONFIG_SEPARATE. This could be fixed
|
|
kusano |
7d535a |
reasonable easily if needed to improve compatibility with other
|
|
kusano |
7d535a |
packages. Many don't properly support PLANARCONFIG_SEPARATE.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Overviews are always written as appended IFDs, rather than using the
|
|
kusano |
7d535a |
``tree of tree's'' approach using the SUBIFD tag. I wanted to implement
|
|
kusano |
7d535a |
both, but it isn't currently easy to add a SUBIFD tag to an existing
|
|
kusano |
7d535a |
main tiff IFD with libtiff. I hope to try this again later.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFF File Tags
|
|
kusano |
7d535a |
--------------
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The results of running addtiffo on a 1024x1024 tiled greyscale file
|
|
kusano |
7d535a |
with the arguments ``2 4 8 16'' is to add four additional TIFF directories
|
|
kusano |
7d535a |
appended on the file with the SUBFILETYPE flag to 0x1 indicating the extra
|
|
kusano |
7d535a |
items are reduced resolution images.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The tiffinfo output of such a file might look like this:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFF Directory at offset 0x118008
|
|
kusano |
7d535a |
Image Width: 1024 Image Length: 1024
|
|
kusano |
7d535a |
Tile Width: 256 Tile Length: 112
|
|
kusano |
7d535a |
Bits/Sample: 8
|
|
kusano |
7d535a |
Compression Scheme: none
|
|
kusano |
7d535a |
Photometric Interpretation: min-is-black
|
|
kusano |
7d535a |
Samples/Pixel: 1
|
|
kusano |
7d535a |
Planar Configuration: single image plane
|
|
kusano |
7d535a |
TIFF Directory at offset 0x15e1d2
|
|
kusano |
7d535a |
Subfile Type: reduced-resolution image (1 = 0x1)
|
|
kusano |
7d535a |
Image Width: 512 Image Length: 512
|
|
kusano |
7d535a |
Tile Width: 256 Tile Length: 112
|
|
kusano |
7d535a |
Bits/Sample: 8
|
|
kusano |
7d535a |
Compression Scheme: none
|
|
kusano |
7d535a |
Photometric Interpretation: min-is-black
|
|
kusano |
7d535a |
Samples/Pixel: 1
|
|
kusano |
7d535a |
Planar Configuration: separate image planes
|
|
kusano |
7d535a |
TIFF Directory at offset 0x1732b8
|
|
kusano |
7d535a |
Subfile Type: reduced-resolution image (1 = 0x1)
|
|
kusano |
7d535a |
Image Width: 256 Image Length: 256
|
|
kusano |
7d535a |
Tile Width: 256 Tile Length: 112
|
|
kusano |
7d535a |
Bits/Sample: 8
|
|
kusano |
7d535a |
Compression Scheme: none
|
|
kusano |
7d535a |
Photometric Interpretation: min-is-black
|
|
kusano |
7d535a |
Samples/Pixel: 1
|
|
kusano |
7d535a |
Planar Configuration: separate image planes
|
|
kusano |
7d535a |
TIFF Directory at offset 0x17a366
|
|
kusano |
7d535a |
Subfile Type: reduced-resolution image (1 = 0x1)
|
|
kusano |
7d535a |
Image Width: 128 Image Length: 128
|
|
kusano |
7d535a |
Tile Width: 128 Tile Length: 112
|
|
kusano |
7d535a |
Bits/Sample: 8
|
|
kusano |
7d535a |
Compression Scheme: none
|
|
kusano |
7d535a |
Photometric Interpretation: min-is-black
|
|
kusano |
7d535a |
Samples/Pixel: 1
|
|
kusano |
7d535a |
Planar Configuration: separate image planes
|
|
kusano |
7d535a |
TIFF Directory at offset 0x17b40c
|
|
kusano |
7d535a |
Subfile Type: reduced-resolution image (1 = 0x1)
|
|
kusano |
7d535a |
Image Width: 64 Image Length: 64
|
|
kusano |
7d535a |
Tile Width: 64 Tile Length: 64
|
|
kusano |
7d535a |
Bits/Sample: 8
|
|
kusano |
7d535a |
Compression Scheme: none
|
|
kusano |
7d535a |
Photometric Interpretation: min-is-black
|
|
kusano |
7d535a |
Samples/Pixel: 1
|
|
kusano |
7d535a |
Planar Configuration: separate image planes
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Building
|
|
kusano |
7d535a |
--------
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
You will need a C compiler. You will need to have libtiff already
|
|
kusano |
7d535a |
built and installed. The provided Makefile should work on most Unix systems.
|
|
kusano |
7d535a |
A similar file will be needed for Windows, but is not provided.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The CFLAGS and LIBS macros in the Makefile will have to be updated to
|
|
kusano |
7d535a |
point to the correct location of the libtiff include files, and library.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Credits
|
|
kusano |
7d535a |
-------
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Intergraph Corporation for partially funding the work.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Global Geomatics for partially funding reorganization of the overview
|
|
kusano |
7d535a |
building ability as a separate utility.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Orrin Long, and Ed Grissom of Intergraph for explaining what needed to
|
|
kusano |
7d535a |
be done.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Max Martinez of Erdas for his discussion of external overviews.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Atlantis Scientific who supported adding averaging, and some other
|
|
kusano |
7d535a |
generalizations.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Frank Warmerdam for writing the bulk of the code.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Sam Leffler since this only exists because of his libtiff.
|
|
kusano |
7d535a |
|