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