README 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. addtiffo 1.0
  2. ============
  3. The addtiffo utility is used to add overview pyramids to an existing
  4. TIFF or GeoTIFF file. Some applications can take advantage of these
  5. overviews to accelerate overview display performance of large rasters.
  6. This release of addtiffo is primarily intended for compatibility testing
  7. with applications, and to see if there is interest in a cleaner release
  8. of the capability ... perhaps incorporation into the libtiff tools
  9. distribution.
  10. Please feel free to contact me with questions, or problems.
  11. warmerda@home.com
  12. http://home.gdal.org/~warmerda/
  13. Usage
  14. -----
  15. Usage: addtiffo [-r {average/nearest} [-subifd]
  16. tiff_filename [resolution_reductions]
  17. Example:
  18. % addtiffo abc.tif 2 4 8 16
  19. The numeric arguments are the list of reduction factors to
  20. generate. In this example a 1/2, 1/4 1/8 and 1/16
  21. Limitations
  22. -----------
  23. See tif_overview.cpp for up to date details.
  24. o Currently only images with bits_per_sample of a multiple of eight
  25. will work.
  26. o The code will attempt to use the same kind of compression,
  27. photometric interpretation, and organization as the source image, but
  28. it doesn't copy geotiff tags to the reduced resolution images.
  29. o Reduced resolution overviews for multi-sample files will currently
  30. always be generated as PLANARCONFIG_SEPARATE. This could be fixed
  31. reasonable easily if needed to improve compatibility with other
  32. packages. Many don't properly support PLANARCONFIG_SEPARATE.
  33. o Overviews are always written as appended IFDs, rather than using the
  34. ``tree of tree's'' approach using the SUBIFD tag. I wanted to implement
  35. both, but it isn't currently easy to add a SUBIFD tag to an existing
  36. main tiff IFD with libtiff. I hope to try this again later.
  37. TIFF File Tags
  38. --------------
  39. The results of running addtiffo on a 1024x1024 tiled greyscale file
  40. with the arguments ``2 4 8 16'' is to add four additional TIFF directories
  41. appended on the file with the SUBFILETYPE flag to 0x1 indicating the extra
  42. items are reduced resolution images.
  43. The tiffinfo output of such a file might look like this:
  44. TIFF Directory at offset 0x118008
  45. Image Width: 1024 Image Length: 1024
  46. Tile Width: 256 Tile Length: 112
  47. Bits/Sample: 8
  48. Compression Scheme: none
  49. Photometric Interpretation: min-is-black
  50. Samples/Pixel: 1
  51. Planar Configuration: single image plane
  52. TIFF Directory at offset 0x15e1d2
  53. Subfile Type: reduced-resolution image (1 = 0x1)
  54. Image Width: 512 Image Length: 512
  55. Tile Width: 256 Tile Length: 112
  56. Bits/Sample: 8
  57. Compression Scheme: none
  58. Photometric Interpretation: min-is-black
  59. Samples/Pixel: 1
  60. Planar Configuration: separate image planes
  61. TIFF Directory at offset 0x1732b8
  62. Subfile Type: reduced-resolution image (1 = 0x1)
  63. Image Width: 256 Image Length: 256
  64. Tile Width: 256 Tile Length: 112
  65. Bits/Sample: 8
  66. Compression Scheme: none
  67. Photometric Interpretation: min-is-black
  68. Samples/Pixel: 1
  69. Planar Configuration: separate image planes
  70. TIFF Directory at offset 0x17a366
  71. Subfile Type: reduced-resolution image (1 = 0x1)
  72. Image Width: 128 Image Length: 128
  73. Tile Width: 128 Tile Length: 112
  74. Bits/Sample: 8
  75. Compression Scheme: none
  76. Photometric Interpretation: min-is-black
  77. Samples/Pixel: 1
  78. Planar Configuration: separate image planes
  79. TIFF Directory at offset 0x17b40c
  80. Subfile Type: reduced-resolution image (1 = 0x1)
  81. Image Width: 64 Image Length: 64
  82. Tile Width: 64 Tile Length: 64
  83. Bits/Sample: 8
  84. Compression Scheme: none
  85. Photometric Interpretation: min-is-black
  86. Samples/Pixel: 1
  87. Planar Configuration: separate image planes
  88. Building
  89. --------
  90. You will need a C compiler. You will need to have libtiff already
  91. built and installed. The provided Makefile should work on most Unix systems.
  92. A similar file will be needed for Windows, but is not provided.
  93. The CFLAGS and LIBS macros in the Makefile will have to be updated to
  94. point to the correct location of the libtiff include files, and library.
  95. Credits
  96. -------
  97. o Intergraph Corporation for partially funding the work.
  98. o Global Geomatics for partially funding reorganization of the overview
  99. building ability as a separate utility.
  100. o Orrin Long, and Ed Grissom of Intergraph for explaining what needed to
  101. be done.
  102. o Max Martinez of Erdas for his discussion of external overviews.
  103. o Atlantis Scientific who supported adding averaging, and some other
  104. generalizations.
  105. o Frank Warmerdam for writing the bulk of the code.
  106. o Sam Leffler since this only exists because of his libtiff.