Blame contrib/addtiffo/README

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