laag-libtiff 4.0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (629) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +57 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.org +34 -0
  5. data/ext/laag/libtiff/extconf.rb +13 -0
  6. data/laag-libtiff.gemspec +20 -0
  7. data/lib/laag/libtiff.rb +29 -0
  8. data/vendor/gitlab.com/libtiff/libtiff/.appveyor.yml +109 -0
  9. data/vendor/gitlab.com/libtiff/libtiff/.cvsignore +4 -0
  10. data/vendor/gitlab.com/libtiff/libtiff/.travis.yml +34 -0
  11. data/vendor/gitlab.com/libtiff/libtiff/CMakeLists.txt +764 -0
  12. data/vendor/gitlab.com/libtiff/libtiff/COMMITTERS +19 -0
  13. data/vendor/gitlab.com/libtiff/libtiff/COPYRIGHT +21 -0
  14. data/vendor/gitlab.com/libtiff/libtiff/ChangeLog +8073 -0
  15. data/vendor/gitlab.com/libtiff/libtiff/HOWTO-RELEASE +119 -0
  16. data/vendor/gitlab.com/libtiff/libtiff/HOWTO-SECURITY-RELEASE +19 -0
  17. data/vendor/gitlab.com/libtiff/libtiff/Makefile.am +91 -0
  18. data/vendor/gitlab.com/libtiff/libtiff/Makefile.in +995 -0
  19. data/vendor/gitlab.com/libtiff/libtiff/Makefile.vc +58 -0
  20. data/vendor/gitlab.com/libtiff/libtiff/README +61 -0
  21. data/vendor/gitlab.com/libtiff/libtiff/README.vms +12 -0
  22. data/vendor/gitlab.com/libtiff/libtiff/RELEASE-DATE +1 -0
  23. data/vendor/gitlab.com/libtiff/libtiff/SConstruct +171 -0
  24. data/vendor/gitlab.com/libtiff/libtiff/TODO +12 -0
  25. data/vendor/gitlab.com/libtiff/libtiff/VERSION +1 -0
  26. data/vendor/gitlab.com/libtiff/libtiff/aclocal.m4 +1194 -0
  27. data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/bmp2tiff.1.html +121 -0
  28. data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/gif2tiff.1.html +141 -0
  29. data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/ras2tiff.1.html +139 -0
  30. data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/sgi2tiff.1.html +147 -0
  31. data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/tiffsv.1.html +207 -0
  32. data/vendor/gitlab.com/libtiff/libtiff/archive/man/bmp2tiff.1 +85 -0
  33. data/vendor/gitlab.com/libtiff/libtiff/archive/man/gif2tiff.1 +81 -0
  34. data/vendor/gitlab.com/libtiff/libtiff/archive/man/ras2tiff.1 +96 -0
  35. data/vendor/gitlab.com/libtiff/libtiff/archive/man/sgi2tiff.1 +93 -0
  36. data/vendor/gitlab.com/libtiff/libtiff/archive/man/tiffsv.1 +142 -0
  37. data/vendor/gitlab.com/libtiff/libtiff/archive/tools/bmp2tiff.c +937 -0
  38. data/vendor/gitlab.com/libtiff/libtiff/archive/tools/gif2tiff.c +591 -0
  39. data/vendor/gitlab.com/libtiff/libtiff/archive/tools/ras2tiff.c +338 -0
  40. data/vendor/gitlab.com/libtiff/libtiff/archive/tools/rasterfile.h +44 -0
  41. data/vendor/gitlab.com/libtiff/libtiff/archive/tools/sgi2tiff.c +337 -0
  42. data/vendor/gitlab.com/libtiff/libtiff/archive/tools/sgisv.c +318 -0
  43. data/vendor/gitlab.com/libtiff/libtiff/archive/tools/ycbcr.c +168 -0
  44. data/vendor/gitlab.com/libtiff/libtiff/autogen.sh +8 -0
  45. data/vendor/gitlab.com/libtiff/libtiff/build/.cvsignore +1 -0
  46. data/vendor/gitlab.com/libtiff/libtiff/build/CMakeLists.txt +25 -0
  47. data/vendor/gitlab.com/libtiff/libtiff/build/Makefile.am +32 -0
  48. data/vendor/gitlab.com/libtiff/libtiff/build/Makefile.in +680 -0
  49. data/vendor/gitlab.com/libtiff/libtiff/build/README +3 -0
  50. data/vendor/gitlab.com/libtiff/libtiff/build/travis-ci +108 -0
  51. data/vendor/gitlab.com/libtiff/libtiff/commit +233 -0
  52. data/vendor/gitlab.com/libtiff/libtiff/config/compile +347 -0
  53. data/vendor/gitlab.com/libtiff/libtiff/config/config.guess +1526 -0
  54. data/vendor/gitlab.com/libtiff/libtiff/config/config.sub +1658 -0
  55. data/vendor/gitlab.com/libtiff/libtiff/config/depcomp +791 -0
  56. data/vendor/gitlab.com/libtiff/libtiff/config/install-sh +507 -0
  57. data/vendor/gitlab.com/libtiff/libtiff/config/ltmain.sh +11156 -0
  58. data/vendor/gitlab.com/libtiff/libtiff/config/missing +215 -0
  59. data/vendor/gitlab.com/libtiff/libtiff/config/mkinstalldirs +161 -0
  60. data/vendor/gitlab.com/libtiff/libtiff/config/test-driver +127 -0
  61. data/vendor/gitlab.com/libtiff/libtiff/configure +23612 -0
  62. data/vendor/gitlab.com/libtiff/libtiff/configure.ac +1112 -0
  63. data/vendor/gitlab.com/libtiff/libtiff/configure.com +1357 -0
  64. data/vendor/gitlab.com/libtiff/libtiff/contrib/.cvsignore +2 -0
  65. data/vendor/gitlab.com/libtiff/libtiff/contrib/CMakeLists.txt +35 -0
  66. data/vendor/gitlab.com/libtiff/libtiff/contrib/Makefile.am +31 -0
  67. data/vendor/gitlab.com/libtiff/libtiff/contrib/Makefile.in +679 -0
  68. data/vendor/gitlab.com/libtiff/libtiff/contrib/README +2 -0
  69. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/.cvsignore +5 -0
  70. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/CMakeLists.txt +34 -0
  71. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/Makefile.am +39 -0
  72. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/Makefile.in +652 -0
  73. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/Makefile.vc +28 -0
  74. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/README +142 -0
  75. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/addtiffo.c +181 -0
  76. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/tif_overview.c +916 -0
  77. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/tif_ovrcache.c +344 -0
  78. data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/tif_ovrcache.h +103 -0
  79. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/.cvsignore +8 -0
  80. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/CMakeLists.txt +43 -0
  81. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/Makefile.am +46 -0
  82. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/Makefile.in +798 -0
  83. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/README +7 -0
  84. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-bi.c +91 -0
  85. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-grayscale.c +147 -0
  86. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-palette.c +284 -0
  87. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-rgb.c +201 -0
  88. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/.cvsignore +2 -0
  89. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/CMakeLists.txt +29 -0
  90. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/Makefile.am +47 -0
  91. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/Makefile.in +516 -0
  92. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/README +6 -0
  93. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/patchlevel.h +8 -0
  94. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/xtiff.c +1290 -0
  95. data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/xtifficon.h +21 -0
  96. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/.cvsignore +5 -0
  97. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/CMakeLists.txt +35 -0
  98. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/Makefile.am +40 -0
  99. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/Makefile.in +650 -0
  100. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/README +25 -0
  101. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/iptcutil.c +954 -0
  102. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/test.iptc +0 -0
  103. data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/test.txt +32 -0
  104. data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/.cvsignore +2 -0
  105. data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/CMakeLists.txt +27 -0
  106. data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/Makefile.am +29 -0
  107. data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/Makefile.in +499 -0
  108. data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/README +37 -0
  109. data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/mfs_file.c +586 -0
  110. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/.cvsignore +2 -0
  111. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/CMakeLists.txt +30 -0
  112. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/Makefile.am +32 -0
  113. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/Makefile.in +502 -0
  114. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/README +90 -0
  115. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_imageiter.c +525 -0
  116. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_imageiter.h +64 -0
  117. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_pdsdirread.c +1131 -0
  118. data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_pdsdirwrite.c +971 -0
  119. data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/.cvsignore +2 -0
  120. data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/CMakeLists.txt +28 -0
  121. data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/Makefile.am +30 -0
  122. data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/Makefile.in +500 -0
  123. data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/README +10 -0
  124. data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/ras2tif.c +254 -0
  125. data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/tif2ras.c +344 -0
  126. data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/.cvsignore +2 -0
  127. data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/CMakeLists.txt +28 -0
  128. data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/Makefile.am +30 -0
  129. data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/Makefile.in +500 -0
  130. data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/README +30 -0
  131. data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/tiffstream.cpp +238 -0
  132. data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/tiffstream.h +70 -0
  133. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/.cvsignore +2 -0
  134. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/CMakeLists.txt +32 -0
  135. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/Makefile.am +33 -0
  136. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/Makefile.in +503 -0
  137. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/README +132 -0
  138. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/listtif.c +39 -0
  139. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/maketif.c +77 -0
  140. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/xtif_dir.c +350 -0
  141. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/xtiffio.h +59 -0
  142. data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/xtiffiop.h +72 -0
  143. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/.cvsignore +2 -0
  144. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/CMakeLists.txt +30 -0
  145. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Makefile.am +32 -0
  146. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Makefile.in +502 -0
  147. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Makefile.w95 +134 -0
  148. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/README.Tiffile +31 -0
  149. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/README.tiff2dib +51 -0
  150. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Tiffile.cpp +449 -0
  151. data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/tiff2dib.c +379 -0
  152. data/vendor/gitlab.com/libtiff/libtiff/html/.cvsignore +5 -0
  153. data/vendor/gitlab.com/libtiff/libtiff/html/BigTIFFProposal.html +99 -0
  154. data/vendor/gitlab.com/libtiff/libtiff/html/CMakeLists.txt +87 -0
  155. data/vendor/gitlab.com/libtiff/libtiff/html/Makefile.am +96 -0
  156. data/vendor/gitlab.com/libtiff/libtiff/html/Makefile.in +798 -0
  157. data/vendor/gitlab.com/libtiff/libtiff/html/TIFFTechNote2.html +707 -0
  158. data/vendor/gitlab.com/libtiff/libtiff/html/addingtags.html +292 -0
  159. data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffdesign.html +80 -0
  160. data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr.html +77 -0
  161. data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/esri.png +0 -0
  162. data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/leica.png +0 -0
  163. data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/safe.png +0 -0
  164. data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/weogeo.png +0 -0
  165. data/vendor/gitlab.com/libtiff/libtiff/html/bugs.html +61 -0
  166. data/vendor/gitlab.com/libtiff/libtiff/html/build.html +737 -0
  167. data/vendor/gitlab.com/libtiff/libtiff/html/contrib.html +209 -0
  168. data/vendor/gitlab.com/libtiff/libtiff/html/document.html +52 -0
  169. data/vendor/gitlab.com/libtiff/libtiff/html/images.html +41 -0
  170. data/vendor/gitlab.com/libtiff/libtiff/html/images/.cvsignore +2 -0
  171. data/vendor/gitlab.com/libtiff/libtiff/html/images/CMakeLists.txt +46 -0
  172. data/vendor/gitlab.com/libtiff/libtiff/html/images/Makefile.am +49 -0
  173. data/vendor/gitlab.com/libtiff/libtiff/html/images/Makefile.in +572 -0
  174. data/vendor/gitlab.com/libtiff/libtiff/html/images/back.gif +0 -0
  175. data/vendor/gitlab.com/libtiff/libtiff/html/images/bali.jpg +0 -0
  176. data/vendor/gitlab.com/libtiff/libtiff/html/images/cat.gif +0 -0
  177. data/vendor/gitlab.com/libtiff/libtiff/html/images/cover.jpg +0 -0
  178. data/vendor/gitlab.com/libtiff/libtiff/html/images/cramps.gif +0 -0
  179. data/vendor/gitlab.com/libtiff/libtiff/html/images/dave.gif +0 -0
  180. data/vendor/gitlab.com/libtiff/libtiff/html/images/info.gif +0 -0
  181. data/vendor/gitlab.com/libtiff/libtiff/html/images/jello.jpg +0 -0
  182. data/vendor/gitlab.com/libtiff/libtiff/html/images/jim.gif +0 -0
  183. data/vendor/gitlab.com/libtiff/libtiff/html/images/note.gif +0 -0
  184. data/vendor/gitlab.com/libtiff/libtiff/html/images/oxford.gif +0 -0
  185. data/vendor/gitlab.com/libtiff/libtiff/html/images/quad.jpg +0 -0
  186. data/vendor/gitlab.com/libtiff/libtiff/html/images/ring.gif +0 -0
  187. data/vendor/gitlab.com/libtiff/libtiff/html/images/smallliz.jpg +0 -0
  188. data/vendor/gitlab.com/libtiff/libtiff/html/images/strike.gif +0 -0
  189. data/vendor/gitlab.com/libtiff/libtiff/html/images/warning.gif +0 -0
  190. data/vendor/gitlab.com/libtiff/libtiff/html/index.html +122 -0
  191. data/vendor/gitlab.com/libtiff/libtiff/html/internals.html +572 -0
  192. data/vendor/gitlab.com/libtiff/libtiff/html/intro.html +68 -0
  193. data/vendor/gitlab.com/libtiff/libtiff/html/libtiff.html +747 -0
  194. data/vendor/gitlab.com/libtiff/libtiff/html/man/.cvsignore +2 -0
  195. data/vendor/gitlab.com/libtiff/libtiff/html/man/CMakeLists.txt +108 -0
  196. data/vendor/gitlab.com/libtiff/libtiff/html/man/HtmlDoc.cmake +50 -0
  197. data/vendor/gitlab.com/libtiff/libtiff/html/man/Makefile.am +122 -0
  198. data/vendor/gitlab.com/libtiff/libtiff/html/man/Makefile.in +642 -0
  199. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFClose.3tiff.html +87 -0
  200. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFDataWidth.3tiff.html +98 -0
  201. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFError.3tiff.html +106 -0
  202. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldDataType.3tiff.html +89 -0
  203. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldName.3tiff.html +86 -0
  204. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldPassCount.3tiff.html +98 -0
  205. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldReadCount.3tiff.html +101 -0
  206. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldTag.3tiff.html +88 -0
  207. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldWriteCount.3tiff.html +108 -0
  208. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFlush.3tiff.html +113 -0
  209. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFGetField.3tiff.html +1969 -0
  210. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFOpen.3tiff.html +421 -0
  211. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFPrintDirectory.3tiff.html +225 -0
  212. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFRGBAImage.3tiff.html +319 -0
  213. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadDirectory.3tiff.html +218 -0
  214. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html +133 -0
  215. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadEncodedTile.3tiff.html +130 -0
  216. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRGBAImage.3tiff.html +301 -0
  217. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html +208 -0
  218. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRGBATile.3tiff.html +261 -0
  219. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRawStrip.3tiff.html +109 -0
  220. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRawTile.3tiff.html +111 -0
  221. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadScanline.3tiff.html +157 -0
  222. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadTile.3tiff.html +133 -0
  223. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFSetDirectory.3tiff.html +122 -0
  224. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFSetField.3tiff.html +1865 -0
  225. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWarning.3tiff.html +108 -0
  226. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteDirectory.3tiff.html +176 -0
  227. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html +153 -0
  228. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html +147 -0
  229. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteRawStrip.3tiff.html +144 -0
  230. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteRawTile.3tiff.html +128 -0
  231. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteScanline.3tiff.html +206 -0
  232. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteTile.3tiff.html +115 -0
  233. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFbuffer.3tiff.html +116 -0
  234. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFcodec.3tiff.html +116 -0
  235. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFcolor.3tiff.html +975 -0
  236. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFmemory.3tiff.html +110 -0
  237. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFquery.3tiff.html +148 -0
  238. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFsize.3tiff.html +95 -0
  239. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFstrip.3tiff.html +129 -0
  240. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFswab.3tiff.html +110 -0
  241. data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFtile.3tiff.html +141 -0
  242. data/vendor/gitlab.com/libtiff/libtiff/html/man/fax2ps.1.html +252 -0
  243. data/vendor/gitlab.com/libtiff/libtiff/html/man/fax2tiff.1.html +607 -0
  244. data/vendor/gitlab.com/libtiff/libtiff/html/man/index.html +64 -0
  245. data/vendor/gitlab.com/libtiff/libtiff/html/man/libtiff.3tiff.html +1150 -0
  246. data/vendor/gitlab.com/libtiff/libtiff/html/man/pal2rgb.1.html +189 -0
  247. data/vendor/gitlab.com/libtiff/libtiff/html/man/ppm2tiff.1.html +141 -0
  248. data/vendor/gitlab.com/libtiff/libtiff/html/man/raw2tiff.1.html +510 -0
  249. data/vendor/gitlab.com/libtiff/libtiff/html/man/rgb2ycbcr.1.html +155 -0
  250. data/vendor/gitlab.com/libtiff/libtiff/html/man/thumbnail.1.html +148 -0
  251. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2bw.1.html +161 -0
  252. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2pdf.1.html +609 -0
  253. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2ps.1.html +639 -0
  254. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2rgba.1.html +162 -0
  255. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffcmp.1.html +156 -0
  256. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffcp.1.html +569 -0
  257. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffcrop.1.html +684 -0
  258. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffdither.1.html +196 -0
  259. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffdump.1.html +145 -0
  260. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffgt.1.html +551 -0
  261. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffinfo.1.html +196 -0
  262. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffmedian.1.html +183 -0
  263. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffset.1.html +176 -0
  264. data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffsplit.1.html +102 -0
  265. data/vendor/gitlab.com/libtiff/libtiff/html/misc.html +117 -0
  266. data/vendor/gitlab.com/libtiff/libtiff/html/support.html +655 -0
  267. data/vendor/gitlab.com/libtiff/libtiff/html/tools.html +137 -0
  268. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta007.html +112 -0
  269. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta016.html +122 -0
  270. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta018.html +84 -0
  271. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta024.html +139 -0
  272. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta028.html +146 -0
  273. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta029.html +86 -0
  274. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta031.html +94 -0
  275. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta032.html +90 -0
  276. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta033.html +82 -0
  277. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta034.html +68 -0
  278. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta035.html +63 -0
  279. data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta036.html +117 -0
  280. data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.1.html +75 -0
  281. data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.2.html +108 -0
  282. data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.3.html +132 -0
  283. data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.4.html +88 -0
  284. data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.5.html +155 -0
  285. data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.6-beta.html +185 -0
  286. data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.7.html +259 -0
  287. data/vendor/gitlab.com/libtiff/libtiff/html/v3.6.0.html +434 -0
  288. data/vendor/gitlab.com/libtiff/libtiff/html/v3.6.1.html +199 -0
  289. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0.html +144 -0
  290. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0alpha.html +249 -0
  291. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0beta.html +162 -0
  292. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0beta2.html +131 -0
  293. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.1.html +233 -0
  294. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.2.html +222 -0
  295. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.3.html +230 -0
  296. data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.4.html +133 -0
  297. data/vendor/gitlab.com/libtiff/libtiff/html/v3.8.0.html +199 -0
  298. data/vendor/gitlab.com/libtiff/libtiff/html/v3.8.1.html +217 -0
  299. data/vendor/gitlab.com/libtiff/libtiff/html/v3.8.2.html +137 -0
  300. data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.0.html +261 -0
  301. data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.0beta.html +304 -0
  302. data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.1.html +115 -0
  303. data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.2.html +122 -0
  304. data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.3.html +160 -0
  305. data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.4.html +125 -0
  306. data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.5.html +270 -0
  307. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.0.html +269 -0
  308. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.1.html +113 -0
  309. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.2.html +118 -0
  310. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.3.html +125 -0
  311. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.4.html +274 -0
  312. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.4beta.html +291 -0
  313. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.5.html +148 -0
  314. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.6.html +139 -0
  315. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.7.html +411 -0
  316. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.8.html +445 -0
  317. data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.9.html +373 -0
  318. data/vendor/gitlab.com/libtiff/libtiff/libtiff-4.pc.in +11 -0
  319. data/vendor/gitlab.com/libtiff/libtiff/libtiff/.cvsignore +22 -0
  320. data/vendor/gitlab.com/libtiff/libtiff/libtiff/CMakeLists.txt +165 -0
  321. data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.am +154 -0
  322. data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.in +966 -0
  323. data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.lcc +129 -0
  324. data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.vc +102 -0
  325. data/vendor/gitlab.com/libtiff/libtiff/libtiff/SConstruct +73 -0
  326. data/vendor/gitlab.com/libtiff/libtiff/libtiff/libtiff.def +168 -0
  327. data/vendor/gitlab.com/libtiff/libtiff/libtiff/libtiff.map +4 -0
  328. data/vendor/gitlab.com/libtiff/libtiff/libtiff/libtiffxx.map +4 -0
  329. data/vendor/gitlab.com/libtiff/libtiff/libtiff/mkg3states.c +454 -0
  330. data/vendor/gitlab.com/libtiff/libtiff/libtiff/mkspans.c +82 -0
  331. data/vendor/gitlab.com/libtiff/libtiff/libtiff/t4.h +292 -0
  332. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_aux.c +376 -0
  333. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_close.c +140 -0
  334. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_codec.c +165 -0
  335. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_color.c +309 -0
  336. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_compress.c +304 -0
  337. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.h-vms +46 -0
  338. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.h.cmake.in +261 -0
  339. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.h.in +410 -0
  340. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.vc.h +137 -0
  341. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.wince.h +71 -0
  342. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dir.c +1767 -0
  343. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dir.h +309 -0
  344. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dirinfo.c +1070 -0
  345. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dirread.c +5803 -0
  346. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dirwrite.c +3024 -0
  347. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dumpmode.c +143 -0
  348. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_error.c +88 -0
  349. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_extension.c +118 -0
  350. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_fax3.c +1648 -0
  351. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_fax3.h +540 -0
  352. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_fax3sm.c +1260 -0
  353. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_flush.c +118 -0
  354. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_getimage.c +3048 -0
  355. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_jbig.c +214 -0
  356. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_jpeg.c +2601 -0
  357. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_jpeg_12.c +69 -0
  358. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_luv.c +1765 -0
  359. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_lzma.c +495 -0
  360. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_lzw.c +1218 -0
  361. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_next.c +189 -0
  362. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_ojpeg.c +2563 -0
  363. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_open.c +725 -0
  364. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_packbits.c +311 -0
  365. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_pixarlog.c +1485 -0
  366. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_predict.c +881 -0
  367. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_predict.h +79 -0
  368. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_print.c +722 -0
  369. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_read.c +1572 -0
  370. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_stream.cxx +430 -0
  371. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_strip.c +389 -0
  372. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_swab.c +312 -0
  373. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_thunder.c +208 -0
  374. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_tile.c +322 -0
  375. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_unix.c +386 -0
  376. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_version.c +40 -0
  377. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_vms.c +611 -0
  378. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_warning.c +89 -0
  379. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_win32.c +476 -0
  380. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_wince.c +293 -0
  381. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_write.c +834 -0
  382. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_zip.c +476 -0
  383. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiff.h +681 -0
  384. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.h-vms +99 -0
  385. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.h.cmake.in +130 -0
  386. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.h.in +127 -0
  387. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.vc.h +161 -0
  388. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.wince.h +121 -0
  389. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffio.h +560 -0
  390. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffio.hxx +49 -0
  391. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffiop.h +445 -0
  392. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffvers.h +9 -0
  393. data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffvers.h.in +9 -0
  394. data/vendor/gitlab.com/libtiff/libtiff/libtiff/uvcode.h +180 -0
  395. data/vendor/gitlab.com/libtiff/libtiff/m4/acinclude.m4 +851 -0
  396. data/vendor/gitlab.com/libtiff/libtiff/m4/ice_find_athena.m4 +187 -0
  397. data/vendor/gitlab.com/libtiff/libtiff/m4/libtool.m4 +8388 -0
  398. data/vendor/gitlab.com/libtiff/libtiff/m4/ltoptions.m4 +437 -0
  399. data/vendor/gitlab.com/libtiff/libtiff/m4/ltsugar.m4 +124 -0
  400. data/vendor/gitlab.com/libtiff/libtiff/m4/ltversion.m4 +23 -0
  401. data/vendor/gitlab.com/libtiff/libtiff/m4/lt~obsolete.m4 +99 -0
  402. data/vendor/gitlab.com/libtiff/libtiff/man/.cvsignore +3 -0
  403. data/vendor/gitlab.com/libtiff/libtiff/man/CMakeLists.txt +97 -0
  404. data/vendor/gitlab.com/libtiff/libtiff/man/Makefile.am +94 -0
  405. data/vendor/gitlab.com/libtiff/libtiff/man/Makefile.in +684 -0
  406. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFClose.3tiff +53 -0
  407. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFDataWidth.3tiff +74 -0
  408. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFError.3tiff +69 -0
  409. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldDataType.3tiff +53 -0
  410. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldName.3tiff +52 -0
  411. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldPassCount.3tiff +73 -0
  412. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldReadCount.3tiff +77 -0
  413. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldTag.3tiff +56 -0
  414. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldWriteCount.3tiff +88 -0
  415. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFlush.3tiff +64 -0
  416. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFGetField.3tiff +229 -0
  417. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFOpen.3tiff +279 -0
  418. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFPrintDirectory.3tiff +70 -0
  419. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFRGBAImage.3tiff +286 -0
  420. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadDirectory.3tiff +164 -0
  421. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadEncodedStrip.3tiff +78 -0
  422. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadEncodedTile.3tiff +76 -0
  423. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRGBAImage.3tiff +218 -0
  424. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRGBAStrip.3tiff +170 -0
  425. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRGBATile.3tiff +171 -0
  426. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRawStrip.3tiff +64 -0
  427. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRawTile.3tiff +65 -0
  428. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadScanline.3tiff +94 -0
  429. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadTile.3tiff +84 -0
  430. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFSetDirectory.3tiff +79 -0
  431. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFSetField.3tiff +217 -0
  432. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWarning.3tiff +70 -0
  433. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteDirectory.3tiff +138 -0
  434. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteEncodedStrip.3tiff +102 -0
  435. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteEncodedTile.3tiff +96 -0
  436. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteRawStrip.3tiff +96 -0
  437. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteRawTile.3tiff +84 -0
  438. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteScanline.3tiff +154 -0
  439. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteTile.3tiff +77 -0
  440. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFbuffer.3tiff +77 -0
  441. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFcodec.3tiff +82 -0
  442. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFcolor.3tiff +268 -0
  443. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFmemory.3tiff +90 -0
  444. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFquery.3tiff +142 -0
  445. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFsize.3tiff +59 -0
  446. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFstrip.3tiff +99 -0
  447. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFswab.3tiff +80 -0
  448. data/vendor/gitlab.com/libtiff/libtiff/man/TIFFtile.3tiff +131 -0
  449. data/vendor/gitlab.com/libtiff/libtiff/man/fax2ps.1 +159 -0
  450. data/vendor/gitlab.com/libtiff/libtiff/man/fax2tiff.1 +286 -0
  451. data/vendor/gitlab.com/libtiff/libtiff/man/libtiff.3tiff +545 -0
  452. data/vendor/gitlab.com/libtiff/libtiff/man/pal2rgb.1 +111 -0
  453. data/vendor/gitlab.com/libtiff/libtiff/man/ppm2tiff.1 +105 -0
  454. data/vendor/gitlab.com/libtiff/libtiff/man/raw2tiff.1 +196 -0
  455. data/vendor/gitlab.com/libtiff/libtiff/man/rgb2ycbcr.1 +99 -0
  456. data/vendor/gitlab.com/libtiff/libtiff/man/thumbnail.1 +90 -0
  457. data/vendor/gitlab.com/libtiff/libtiff/man/tiff2bw.1 +94 -0
  458. data/vendor/gitlab.com/libtiff/libtiff/man/tiff2pdf.1 +254 -0
  459. data/vendor/gitlab.com/libtiff/libtiff/man/tiff2ps.1 +294 -0
  460. data/vendor/gitlab.com/libtiff/libtiff/man/tiff2rgba.1 +97 -0
  461. data/vendor/gitlab.com/libtiff/libtiff/man/tiffcmp.1 +87 -0
  462. data/vendor/gitlab.com/libtiff/libtiff/man/tiffcp.1 +317 -0
  463. data/vendor/gitlab.com/libtiff/libtiff/man/tiffcrop.1 +571 -0
  464. data/vendor/gitlab.com/libtiff/libtiff/man/tiffdither.1 +135 -0
  465. data/vendor/gitlab.com/libtiff/libtiff/man/tiffdump.1 +81 -0
  466. data/vendor/gitlab.com/libtiff/libtiff/man/tiffgt.1 +245 -0
  467. data/vendor/gitlab.com/libtiff/libtiff/man/tiffinfo.1 +88 -0
  468. data/vendor/gitlab.com/libtiff/libtiff/man/tiffmedian.1 +112 -0
  469. data/vendor/gitlab.com/libtiff/libtiff/man/tiffset.1 +99 -0
  470. data/vendor/gitlab.com/libtiff/libtiff/man/tiffsplit.1 +69 -0
  471. data/vendor/gitlab.com/libtiff/libtiff/nmake.opt +229 -0
  472. data/vendor/gitlab.com/libtiff/libtiff/port/.cvsignore +7 -0
  473. data/vendor/gitlab.com/libtiff/libtiff/port/CMakeLists.txt +60 -0
  474. data/vendor/gitlab.com/libtiff/libtiff/port/Makefile.am +35 -0
  475. data/vendor/gitlab.com/libtiff/libtiff/port/Makefile.in +656 -0
  476. data/vendor/gitlab.com/libtiff/libtiff/port/Makefile.vc +44 -0
  477. data/vendor/gitlab.com/libtiff/libtiff/port/dummy.c +12 -0
  478. data/vendor/gitlab.com/libtiff/libtiff/port/getopt.c +125 -0
  479. data/vendor/gitlab.com/libtiff/libtiff/port/lfind.c +62 -0
  480. data/vendor/gitlab.com/libtiff/libtiff/port/libport.h +60 -0
  481. data/vendor/gitlab.com/libtiff/libtiff/port/snprintf.c +38 -0
  482. data/vendor/gitlab.com/libtiff/libtiff/port/strcasecmp.c +51 -0
  483. data/vendor/gitlab.com/libtiff/libtiff/port/strtoul.c +109 -0
  484. data/vendor/gitlab.com/libtiff/libtiff/port/strtoull.c +116 -0
  485. data/vendor/gitlab.com/libtiff/libtiff/test/.cvsignore +12 -0
  486. data/vendor/gitlab.com/libtiff/libtiff/test/CMakeLists.txt +382 -0
  487. data/vendor/gitlab.com/libtiff/libtiff/test/Makefile.am +334 -0
  488. data/vendor/gitlab.com/libtiff/libtiff/test/Makefile.in +1987 -0
  489. data/vendor/gitlab.com/libtiff/libtiff/test/TiffSplitTest.cmake +34 -0
  490. data/vendor/gitlab.com/libtiff/libtiff/test/TiffTest.cmake +63 -0
  491. data/vendor/gitlab.com/libtiff/libtiff/test/TiffTestCommon.cmake +108 -0
  492. data/vendor/gitlab.com/libtiff/libtiff/test/ascii_tag.c +177 -0
  493. data/vendor/gitlab.com/libtiff/libtiff/test/check_tag.c +91 -0
  494. data/vendor/gitlab.com/libtiff/libtiff/test/common.sh +122 -0
  495. data/vendor/gitlab.com/libtiff/libtiff/test/custom_dir.c +247 -0
  496. data/vendor/gitlab.com/libtiff/libtiff/test/images/README.txt +29 -0
  497. data/vendor/gitlab.com/libtiff/libtiff/test/images/logluv-3c-16b.tiff +0 -0
  498. data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-1c-16b.tiff +0 -0
  499. data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-1c-8b.pgm +0 -0
  500. data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-1c-8b.tiff +0 -0
  501. data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-2c-8b-alpha.tiff +0 -0
  502. data/vendor/gitlab.com/libtiff/libtiff/test/images/miniswhite-1c-1b.pbm +0 -0
  503. data/vendor/gitlab.com/libtiff/libtiff/test/images/miniswhite-1c-1b.tiff +0 -0
  504. data/vendor/gitlab.com/libtiff/libtiff/test/images/palette-1c-1b.tiff +0 -0
  505. data/vendor/gitlab.com/libtiff/libtiff/test/images/palette-1c-4b.tiff +0 -0
  506. data/vendor/gitlab.com/libtiff/libtiff/test/images/palette-1c-8b.tiff +0 -0
  507. data/vendor/gitlab.com/libtiff/libtiff/test/images/quad-lzw-compat.tiff +0 -0
  508. data/vendor/gitlab.com/libtiff/libtiff/test/images/quad-tile.jpg.tiff +0 -0
  509. data/vendor/gitlab.com/libtiff/libtiff/test/images/rgb-3c-16b.tiff +0 -0
  510. data/vendor/gitlab.com/libtiff/libtiff/test/images/rgb-3c-8b.ppm +0 -0
  511. data/vendor/gitlab.com/libtiff/libtiff/test/images/rgb-3c-8b.tiff +0 -0
  512. data/vendor/gitlab.com/libtiff/libtiff/test/long_tag.c +156 -0
  513. data/vendor/gitlab.com/libtiff/libtiff/test/ppm2tiff_pbm.sh +7 -0
  514. data/vendor/gitlab.com/libtiff/libtiff/test/ppm2tiff_pgm.sh +7 -0
  515. data/vendor/gitlab.com/libtiff/libtiff/test/ppm2tiff_ppm.sh +7 -0
  516. data/vendor/gitlab.com/libtiff/libtiff/test/raw_decode.c +304 -0
  517. data/vendor/gitlab.com/libtiff/libtiff/test/rewrite_tag.c +344 -0
  518. data/vendor/gitlab.com/libtiff/libtiff/test/short_tag.c +205 -0
  519. data/vendor/gitlab.com/libtiff/libtiff/test/strip.c +290 -0
  520. data/vendor/gitlab.com/libtiff/libtiff/test/strip_rw.c +157 -0
  521. data/vendor/gitlab.com/libtiff/libtiff/test/test_arrays.c +829 -0
  522. data/vendor/gitlab.com/libtiff/libtiff/test/test_arrays.h +63 -0
  523. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2bw-palette-1c-8b.sh +7 -0
  524. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2bw-quad-lzw-compat.sh +7 -0
  525. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2bw-rgb-3c-8b.sh +7 -0
  526. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2pdf.sh +6 -0
  527. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-EPS1.sh +6 -0
  528. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-PS1.sh +6 -0
  529. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-PS2.sh +6 -0
  530. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-PS3.sh +6 -0
  531. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-logluv-3c-16b.sh +7 -0
  532. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-minisblack-1c-16b.sh +7 -0
  533. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-minisblack-1c-8b.sh +7 -0
  534. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh +7 -0
  535. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-miniswhite-1c-1b.sh +7 -0
  536. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-palette-1c-1b.sh +7 -0
  537. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-palette-1c-4b.sh +7 -0
  538. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-palette-1c-8b.sh +7 -0
  539. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-quad-tile.jpg.sh +7 -0
  540. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-rgb-3c-16b.sh +7 -0
  541. data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-rgb-3c-8b.sh +7 -0
  542. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-1d-fill.sh +7 -0
  543. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-1d.sh +6 -0
  544. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-2d-fill.sh +7 -0
  545. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-2d.sh +6 -0
  546. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3.sh +6 -0
  547. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g4.sh +6 -0
  548. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-logluv.sh +7 -0
  549. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-lzw-compat.sh +6 -0
  550. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-split-join.sh +16 -0
  551. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-split.sh +13 -0
  552. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-thumbnail.sh +10 -0
  553. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-logluv-3c-16b.sh +7 -0
  554. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-minisblack-1c-16b.sh +7 -0
  555. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-minisblack-1c-8b.sh +7 -0
  556. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh +7 -0
  557. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-miniswhite-1c-1b.sh +7 -0
  558. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-palette-1c-1b.sh +7 -0
  559. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-palette-1c-4b.sh +7 -0
  560. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-palette-1c-8b.sh +7 -0
  561. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-quad-tile.jpg.sh +7 -0
  562. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-rgb-3c-16b.sh +7 -0
  563. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-rgb-3c-8b.sh +7 -0
  564. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh +7 -0
  565. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh +7 -0
  566. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh +7 -0
  567. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh +7 -0
  568. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh +7 -0
  569. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-palette-1c-1b.sh +7 -0
  570. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-palette-1c-4b.sh +7 -0
  571. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-palette-1c-8b.sh +7 -0
  572. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-quad-tile.jpg.sh +7 -0
  573. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh +7 -0
  574. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh +7 -0
  575. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-logluv-3c-16b.sh +7 -0
  576. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-minisblack-1c-16b.sh +7 -0
  577. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-minisblack-1c-8b.sh +7 -0
  578. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh +7 -0
  579. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-miniswhite-1c-1b.sh +7 -0
  580. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-palette-1c-1b.sh +7 -0
  581. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-palette-1c-4b.sh +7 -0
  582. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-palette-1c-8b.sh +7 -0
  583. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-quad-tile.jpg.sh +7 -0
  584. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-rgb-3c-16b.sh +7 -0
  585. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-rgb-3c-8b.sh +7 -0
  586. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-logluv-3c-16b.sh +7 -0
  587. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh +7 -0
  588. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh +7 -0
  589. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh +7 -0
  590. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh +7 -0
  591. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-palette-1c-1b.sh +7 -0
  592. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-palette-1c-4b.sh +7 -0
  593. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-palette-1c-8b.sh +7 -0
  594. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-quad-tile.jpg.sh +7 -0
  595. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-rgb-3c-16b.sh +7 -0
  596. data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-rgb-3c-8b.sh +7 -0
  597. data/vendor/gitlab.com/libtiff/libtiff/test/tiffdump.sh +6 -0
  598. data/vendor/gitlab.com/libtiff/libtiff/test/tiffinfo.sh +6 -0
  599. data/vendor/gitlab.com/libtiff/libtiff/test/tifftest.h +42 -0
  600. data/vendor/gitlab.com/libtiff/libtiff/tiff.spec +68 -0
  601. data/vendor/gitlab.com/libtiff/libtiff/tools/.cvsignore +27 -0
  602. data/vendor/gitlab.com/libtiff/libtiff/tools/CMakeLists.txt +125 -0
  603. data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.am +138 -0
  604. data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.in +955 -0
  605. data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.lcc +133 -0
  606. data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.vc +52 -0
  607. data/vendor/gitlab.com/libtiff/libtiff/tools/fax2ps.c +463 -0
  608. data/vendor/gitlab.com/libtiff/libtiff/tools/fax2tiff.c +491 -0
  609. data/vendor/gitlab.com/libtiff/libtiff/tools/pal2rgb.c +438 -0
  610. data/vendor/gitlab.com/libtiff/libtiff/tools/ppm2tiff.c +397 -0
  611. data/vendor/gitlab.com/libtiff/libtiff/tools/raw2tiff.c +690 -0
  612. data/vendor/gitlab.com/libtiff/libtiff/tools/rgb2ycbcr.c +397 -0
  613. data/vendor/gitlab.com/libtiff/libtiff/tools/thumbnail.c +691 -0
  614. data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2bw.c +501 -0
  615. data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2pdf.c +5594 -0
  616. data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2ps.c +3106 -0
  617. data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2rgba.c +569 -0
  618. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffcmp.c +659 -0
  619. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffcp.c +1913 -0
  620. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffcrop.c +9231 -0
  621. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffdither.c +347 -0
  622. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffdump.c +889 -0
  623. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffgt.c +486 -0
  624. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffinfo.c +488 -0
  625. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffinfoce.c +472 -0
  626. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffmedian.c +918 -0
  627. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffset.c +356 -0
  628. data/vendor/gitlab.com/libtiff/libtiff/tools/tiffsplit.c +305 -0
  629. metadata +692 -0
@@ -0,0 +1,64 @@
1
+ typedef struct _TIFFImageIter TIFFImageIter;
2
+
3
+ /* The callback function is called for each "block" of image pixel data after
4
+ it has been read from the file and decoded. This image pixel data is in the
5
+ buffer pp, and this data represents the image pixels from (x,y) to
6
+ (x+w,y+h). It is stored in pixel format, so each pixel contains
7
+ img->samplesperpixel consecutive samples each containing img->bitspersample
8
+ bits of data. The array pp is ordered in h consecutive rows of w+fromskew
9
+ pixels each. */
10
+ typedef void (*ImageIterTileContigRoutine)
11
+ (TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
12
+ unsigned char*);
13
+ #define DECLAREContigCallbackFunc(name) \
14
+ static void name(\
15
+ TIFFImageIter* img, \
16
+ void* user_data, \
17
+ uint32 x, uint32 y, \
18
+ uint32 w, uint32 h, \
19
+ int32 fromskew, \
20
+ u_char* pp \
21
+ )
22
+
23
+ typedef void (*ImageIterTileSeparateRoutine)
24
+ (TIFFImageIter*, void *, uint32, uint32, uint32, uint32, int32,
25
+ unsigned char*, unsigned char*, unsigned char*, unsigned char*);
26
+ #define DECLARESepCallbackFunc(name) \
27
+ static void name(\
28
+ TIFFImageIter* img, \
29
+ void* user_data, \
30
+ uint32 x, uint32 y, \
31
+ uint32 w, uint32 h,\
32
+ int32 fromskew, \
33
+ u_char* r, u_char* g, u_char* b, u_char* a\
34
+ )
35
+
36
+ struct _TIFFImageIter {
37
+ TIFF* tif; /* image handle */
38
+ int stoponerr; /* stop on read error */
39
+ int isContig; /* data is packed/separate */
40
+ int alpha; /* type of alpha data present */
41
+ uint32 width; /* image width */
42
+ uint32 height; /* image height */
43
+ uint16 bitspersample; /* image bits/sample */
44
+ uint16 samplesperpixel; /* image samples/pixel */
45
+ uint16 orientation; /* image orientation */
46
+ uint16 photometric; /* image photometric interp */
47
+ uint16* redcmap; /* colormap pallete */
48
+ uint16* greencmap;
49
+ uint16* bluecmap;
50
+ /* get image data routine */
51
+ int (*get)(TIFFImageIter*, void *udata, uint32, uint32);
52
+ union {
53
+ void (*any)(TIFFImageIter*);
54
+ ImageIterTileContigRoutine contig;
55
+ ImageIterTileSeparateRoutine separate;
56
+ } callback; /* fn to exec for each block */
57
+ };
58
+ /*
59
+ * Local Variables:
60
+ * mode: c
61
+ * c-basic-offset: 8
62
+ * fill-column: 78
63
+ * End:
64
+ */
@@ -0,0 +1,1131 @@
1
+ /* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirread.c,v 1.4 2010-06-08 18:55:15 bfriesen Exp $ */
2
+
3
+ /*
4
+ * Copyright (c) 1988-1996 Sam Leffler
5
+ * Copyright (c) 1991-1996 Silicon Graphics, Inc.
6
+ * Copyright (c( 1996 USAF Phillips Laboratory
7
+ *
8
+ * Permission to use, copy, modify, distribute, and sell this software and
9
+ * its documentation for any purpose is hereby granted without fee, provided
10
+ * that (i) the above copyright notices and this permission notice appear in
11
+ * all copies of the software and related documentation, and (ii) the names of
12
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
13
+ * publicity relating to the software without the specific, prior written
14
+ * permission of Sam Leffler and Silicon Graphics.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
17
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19
+ *
20
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
21
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
22
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
23
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
24
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
25
+ * OF THIS SOFTWARE.
26
+ */
27
+
28
+ /*
29
+ * TIFF Library.
30
+ *
31
+ * These routines written by Conrad J. Poelman on a single late-night of
32
+ * March 20-21, 1996.
33
+ *
34
+ * The entire purpose of this file is to provide a single external function,
35
+ * TIFFReadPrivateDataSubDirectory(). This function is intended for use in reading a
36
+ * private subdirectory from a TIFF file into a private structure. The
37
+ * actual writing of data into the structure is handled by the setFieldFn(),
38
+ * which is passed to TIFFReadPrivateDataSubDirectory() as a parameter. The idea is to
39
+ * enable any application wishing to store private subdirectories to do so
40
+ * easily using this function, without modifying the TIFF library.
41
+ *
42
+ * The astute observer will notice that only two functions are at all different
43
+ * from the original tif_dirread.c file: TIFFReadPrivateDataSubDirectory() and
44
+ * TIFFFetchNormalSubTag(). All the other stuff that makes this file so huge
45
+ * is only necessary because all of those functions are declared static in
46
+ * tif_dirread.c, so we have to totally duplicate them in order to use them.
47
+ *
48
+ * Oh, also note the bug fix in TIFFFetchFloat().
49
+ *
50
+ */
51
+
52
+ #include "tiffiop.h"
53
+
54
+ #define IGNORE 0 /* tag placeholder used below */
55
+
56
+ #if HAVE_IEEEFP
57
+ #define TIFFCvtIEEEFloatToNative(tif, n, fp)
58
+ #define TIFFCvtIEEEDoubleToNative(tif, n, dp)
59
+ #else
60
+ extern void TIFFCvtIEEEFloatToNative(TIFF*, uint32, float*);
61
+ extern void TIFFCvtIEEEDoubleToNative(TIFF*, uint32, double*);
62
+ #endif
63
+
64
+ static void EstimateStripByteCounts(TIFF*, TIFFDirEntry*, uint16);
65
+ static void MissingRequired(TIFF*, const char*);
66
+ static int CheckDirCount(TIFF*, TIFFDirEntry*, uint32);
67
+ static tsize_t TIFFFetchData(TIFF*, TIFFDirEntry*, char*);
68
+ static tsize_t TIFFFetchString(TIFF*, TIFFDirEntry*, char*);
69
+ static float TIFFFetchRational(TIFF*, TIFFDirEntry*);
70
+ static int TIFFFetchNormalSubTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*,
71
+ int (*getFieldFn)(TIFF *tif,ttag_t tag,...));
72
+ static int TIFFFetchPerSampleShorts(TIFF*, TIFFDirEntry*, int*);
73
+ static int TIFFFetchPerSampleAnys(TIFF*, TIFFDirEntry*, double*);
74
+ static int TIFFFetchShortArray(TIFF*, TIFFDirEntry*, uint16*);
75
+ static int TIFFFetchStripThing(TIFF*, TIFFDirEntry*, long, uint32**);
76
+ static int TIFFFetchExtraSamples(TIFF*, TIFFDirEntry*);
77
+ static int TIFFFetchRefBlackWhite(TIFF*, TIFFDirEntry*);
78
+ static float TIFFFetchFloat(TIFF*, TIFFDirEntry*);
79
+ static int TIFFFetchFloatArray(TIFF*, TIFFDirEntry*, float*);
80
+ static int TIFFFetchDoubleArray(TIFF*, TIFFDirEntry*, double*);
81
+ static int TIFFFetchAnyArray(TIFF*, TIFFDirEntry*, double*);
82
+ static int TIFFFetchShortPair(TIFF*, TIFFDirEntry*);
83
+ #if STRIPCHOP_SUPPORT
84
+ static void ChopUpSingleUncompressedStrip(TIFF*);
85
+ #endif
86
+
87
+ static char *
88
+ CheckMalloc(TIFF* tif, tsize_t n, const char* what)
89
+ {
90
+ char *cp = (char*)_TIFFmalloc(n);
91
+ if (cp == NULL)
92
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "No space %s", what);
93
+ return (cp);
94
+ }
95
+
96
+ /* Just as was done with TIFFWritePrivateDataSubDirectory(), here we implement
97
+ TIFFReadPrivateDataSubDirectory() which takes an offset into the TIFF file,
98
+ a TIFFFieldInfo structure specifying the types of the various tags,
99
+ and a function to use to set individual tags when they are encountered.
100
+ The data is read from the file, translated using the TIFF library's
101
+ built-in machine-independent conversion functions, and filled into
102
+ private subdirectory structure.
103
+
104
+ This code was written by copying the original TIFFReadDirectory() function
105
+ from tif_dirread.c and paring it down to what is needed for this.
106
+
107
+ It is the caller's responsibility to allocate and initialize the internal
108
+ structure that setFieldFn() will be writing into. If this function is being
109
+ called more than once before closing the file, the caller also must be
110
+ careful to free data in the structure before re-initializing.
111
+
112
+ It is also the caller's responsibility to verify the presence of
113
+ any required fields after reading the directory in.
114
+ */
115
+
116
+
117
+ int
118
+ TIFFReadPrivateDataSubDirectory(TIFF* tif, toff_t pdir_offset,
119
+ TIFFFieldInfo *field_info,
120
+ int (*setFieldFn)(TIFF *tif, ttag_t tag, ...))
121
+ {
122
+ register TIFFDirEntry* dp;
123
+ register int n;
124
+ register TIFFDirectory* td;
125
+ TIFFDirEntry* dir;
126
+ int iv;
127
+ long v;
128
+ double dv;
129
+ const TIFFFieldInfo* fip;
130
+ int fix;
131
+ uint16 dircount;
132
+ uint32 nextdiroff;
133
+ char* cp;
134
+ int diroutoforderwarning = 0;
135
+
136
+ /* Skipped part about checking for directories or compression data. */
137
+
138
+ if (!isMapped(tif)) {
139
+ if (!SeekOK(tif, pdir_offset)) {
140
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
141
+ "Seek error accessing TIFF private subdirectory");
142
+ return (0);
143
+ }
144
+ if (!ReadOK(tif, &dircount, sizeof (uint16))) {
145
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
146
+ "Can not read TIFF private subdirectory count");
147
+ return (0);
148
+ }
149
+ if (tif->tif_flags & TIFF_SWAB)
150
+ TIFFSwabShort(&dircount);
151
+ dir = (TIFFDirEntry *)CheckMalloc(tif,
152
+ dircount * sizeof (TIFFDirEntry), "to read TIFF private subdirectory");
153
+ if (dir == NULL)
154
+ return (0);
155
+ if (!ReadOK(tif, dir, dircount*sizeof (TIFFDirEntry))) {
156
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Can not read TIFF private subdirectory");
157
+ goto bad;
158
+ }
159
+ /*
160
+ * Read offset to next directory for sequential scans.
161
+ */
162
+ (void) ReadOK(tif, &nextdiroff, sizeof (uint32));
163
+ } else {
164
+ toff_t off = pdir_offset;
165
+
166
+ if (off + sizeof (short) > tif->tif_size) {
167
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
168
+ "Can not read TIFF private subdirectory count");
169
+ return (0);
170
+ } else
171
+ _TIFFmemcpy(&dircount, tif->tif_base + off, sizeof (uint16));
172
+ off += sizeof (uint16);
173
+ if (tif->tif_flags & TIFF_SWAB)
174
+ TIFFSwabShort(&dircount);
175
+ dir = (TIFFDirEntry *)CheckMalloc(tif,
176
+ dircount * sizeof (TIFFDirEntry), "to read TIFF private subdirectory");
177
+ if (dir == NULL)
178
+ return (0);
179
+ if (off + dircount*sizeof (TIFFDirEntry) > tif->tif_size) {
180
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Can not read TIFF private subdirectory");
181
+ goto bad;
182
+ } else
183
+ _TIFFmemcpy(dir, tif->tif_base + off,
184
+ dircount*sizeof (TIFFDirEntry));
185
+ off += dircount* sizeof (TIFFDirEntry);
186
+ if (off + sizeof (uint32) < tif->tif_size)
187
+ _TIFFmemcpy(&nextdiroff, tif->tif_base+off, sizeof (uint32));
188
+ }
189
+ if (tif->tif_flags & TIFF_SWAB)
190
+ TIFFSwabLong(&nextdiroff);
191
+
192
+ /*
193
+ * Setup default value and then make a pass over
194
+ * the fields to check type and tag information,
195
+ * and to extract info required to size data
196
+ * structures. A second pass is made afterwards
197
+ * to read in everthing not taken in the first pass.
198
+ */
199
+ td = &tif->tif_dir;
200
+
201
+ for (fip = field_info, dp = dir, n = dircount;
202
+ n > 0; n--, dp++) {
203
+ if (tif->tif_flags & TIFF_SWAB) {
204
+ TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
205
+ TIFFSwabArrayOfLong(&dp->tdir_count, 2);
206
+ }
207
+ /*
208
+ * Find the field information entry for this tag.
209
+ */
210
+ /*
211
+ * Silicon Beach (at least) writes unordered
212
+ * directory tags (violating the spec). Handle
213
+ * it here, but be obnoxious (maybe they'll fix it?).
214
+ */
215
+ if (dp->tdir_tag < fip->field_tag) {
216
+ if (!diroutoforderwarning) {
217
+ TIFFWarning(tif->tif_name,
218
+ "invalid TIFF private subdirectory; tags are not sorted in ascending order");
219
+ diroutoforderwarning = 1;
220
+ }
221
+ fip = field_info; /* O(n^2) */
222
+ }
223
+
224
+ while (fip->field_tag && fip->field_tag < dp->tdir_tag)
225
+ fip++;
226
+ if (!fip->field_tag || fip->field_tag != dp->tdir_tag) {
227
+ TIFFWarning(tif->tif_name,
228
+ "unknown field with tag %d (0x%x) in private subdirectory ignored",
229
+ dp->tdir_tag, dp->tdir_tag);
230
+ dp->tdir_tag = IGNORE;
231
+ fip = field_info;/* restart search */
232
+ continue;
233
+ }
234
+ /*
235
+ * Null out old tags that we ignore.
236
+ */
237
+
238
+ /* Not implemented yet, since FIELD_IGNORE is specific to
239
+ the main directories. Could pass this in too... */
240
+ if (0 /* && fip->field_bit == FIELD_IGNORE */) {
241
+ ignore:
242
+ dp->tdir_tag = IGNORE;
243
+ continue;
244
+ }
245
+
246
+ /*
247
+ * Check data type.
248
+ */
249
+
250
+ while (dp->tdir_type != (u_short)fip->field_type) {
251
+ if (fip->field_type == TIFF_ANY) /* wildcard */
252
+ break;
253
+ fip++;
254
+ if (!fip->field_tag || fip->field_tag != dp->tdir_tag) {
255
+ TIFFWarning(tif->tif_name,
256
+ "wrong data type %d for \"%s\"; tag ignored",
257
+ dp->tdir_type, fip[-1].field_name);
258
+ goto ignore;
259
+ }
260
+ }
261
+ /*
262
+ * Check count if known in advance.
263
+ */
264
+ if (fip->field_readcount != TIFF_VARIABLE) {
265
+ uint32 expected = (fip->field_readcount == TIFF_SPP) ?
266
+ (uint32) td->td_samplesperpixel :
267
+ (uint32) fip->field_readcount;
268
+ if (!CheckDirCount(tif, dp, expected))
269
+ goto ignore;
270
+ }
271
+
272
+ /* Now read in and process data from field. */
273
+ if (!TIFFFetchNormalSubTag(tif, dp, fip, setFieldFn))
274
+ goto bad;
275
+
276
+ }
277
+
278
+ if (dir)
279
+ _TIFFfree(dir);
280
+ return (1);
281
+ bad:
282
+ if (dir)
283
+ _TIFFfree(dir);
284
+ return (0);
285
+ }
286
+
287
+ static void
288
+ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
289
+ {
290
+ register TIFFDirEntry *dp;
291
+ register TIFFDirectory *td = &tif->tif_dir;
292
+ uint16 i;
293
+
294
+ if (td->td_stripbytecount)
295
+ _TIFFfree(td->td_stripbytecount);
296
+ td->td_stripbytecount = (uint32*)
297
+ CheckMalloc(tif, td->td_nstrips * sizeof (uint32),
298
+ "for \"StripByteCounts\" array");
299
+ if (td->td_compression != COMPRESSION_NONE) {
300
+ uint32 space = (uint32)(sizeof (TIFFHeader)
301
+ + sizeof (uint16)
302
+ + (dircount * sizeof (TIFFDirEntry))
303
+ + sizeof (uint32));
304
+ toff_t filesize = TIFFGetFileSize(tif);
305
+ uint16 n;
306
+
307
+ /* calculate amount of space used by indirect values */
308
+ for (dp = dir, n = dircount; n > 0; n--, dp++) {
309
+ uint32 cc = dp->tdir_count*TIFFDataWidth(dp->tdir_type);
310
+ if (cc > sizeof (uint32))
311
+ space += cc;
312
+ }
313
+ space = (filesize - space) / td->td_samplesperpixel;
314
+ for (i = 0; i < td->td_nstrips; i++)
315
+ td->td_stripbytecount[i] = space;
316
+ /*
317
+ * This gross hack handles the case were the offset to
318
+ * the last strip is past the place where we think the strip
319
+ * should begin. Since a strip of data must be contiguous,
320
+ * it's safe to assume that we've overestimated the amount
321
+ * of data in the strip and trim this number back accordingly.
322
+ */
323
+ i--;
324
+ if (td->td_stripoffset[i] + td->td_stripbytecount[i] > filesize)
325
+ td->td_stripbytecount[i] =
326
+ filesize - td->td_stripoffset[i];
327
+ } else {
328
+ uint32 rowbytes = TIFFScanlineSize(tif);
329
+ uint32 rowsperstrip = td->td_imagelength / td->td_nstrips;
330
+ for (i = 0; i < td->td_nstrips; i++)
331
+ td->td_stripbytecount[i] = rowbytes*rowsperstrip;
332
+ }
333
+ TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
334
+ if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP))
335
+ td->td_rowsperstrip = td->td_imagelength;
336
+ }
337
+
338
+ static void
339
+ MissingRequired(TIFF* tif, const char* tagname)
340
+ {
341
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
342
+ "TIFF directory is missing required \"%s\" field", tagname);
343
+ }
344
+
345
+ /*
346
+ * Check the count field of a directory
347
+ * entry against a known value. The caller
348
+ * is expected to skip/ignore the tag if
349
+ * there is a mismatch.
350
+ */
351
+ static int
352
+ CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count)
353
+ {
354
+ if (count != dir->tdir_count) {
355
+ TIFFWarning(tif->tif_name,
356
+ "incorrect count for field \"%s\" (%lu, expecting %lu); tag ignored",
357
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
358
+ dir->tdir_count, count);
359
+ return (0);
360
+ }
361
+ return (1);
362
+ }
363
+
364
+ /*
365
+ * Fetch a contiguous directory item.
366
+ */
367
+ static tsize_t
368
+ TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp)
369
+ {
370
+ int w = TIFFDataWidth(dir->tdir_type);
371
+ tsize_t cc = dir->tdir_count * w;
372
+
373
+ if (!isMapped(tif)) {
374
+ if (!SeekOK(tif, dir->tdir_offset))
375
+ goto bad;
376
+ if (!ReadOK(tif, cp, cc))
377
+ goto bad;
378
+ } else {
379
+ if (dir->tdir_offset + cc > tif->tif_size)
380
+ goto bad;
381
+ _TIFFmemcpy(cp, tif->tif_base + dir->tdir_offset, cc);
382
+ }
383
+ if (tif->tif_flags & TIFF_SWAB) {
384
+ switch (dir->tdir_type) {
385
+ case TIFF_SHORT:
386
+ case TIFF_SSHORT:
387
+ TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
388
+ break;
389
+ case TIFF_LONG:
390
+ case TIFF_SLONG:
391
+ case TIFF_FLOAT:
392
+ TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
393
+ break;
394
+ case TIFF_RATIONAL:
395
+ case TIFF_SRATIONAL:
396
+ TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
397
+ break;
398
+ case TIFF_DOUBLE:
399
+ TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
400
+ break;
401
+ }
402
+ }
403
+ return (cc);
404
+ bad:
405
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "Error fetching data for field \"%s\"",
406
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
407
+ return ((tsize_t) 0);
408
+ }
409
+
410
+ /*
411
+ * Fetch an ASCII item from the file.
412
+ */
413
+ static tsize_t
414
+ TIFFFetchString(TIFF* tif, TIFFDirEntry* dir, char* cp)
415
+ {
416
+ if (dir->tdir_count <= 4) {
417
+ uint32 l = dir->tdir_offset;
418
+ if (tif->tif_flags & TIFF_SWAB)
419
+ TIFFSwabLong(&l);
420
+ _TIFFmemcpy(cp, &l, dir->tdir_count);
421
+ return (1);
422
+ }
423
+ return (TIFFFetchData(tif, dir, cp));
424
+ }
425
+
426
+ /*
427
+ * Convert numerator+denominator to float.
428
+ */
429
+ static int
430
+ cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv)
431
+ {
432
+ if (denom == 0) {
433
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
434
+ "%s: Rational with zero denominator (num = %lu)",
435
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num);
436
+ return (0);
437
+ } else {
438
+ if (dir->tdir_type == TIFF_RATIONAL)
439
+ *rv = ((float)num / (float)denom);
440
+ else
441
+ *rv = ((float)(int32)num / (float)(int32)denom);
442
+ return (1);
443
+ }
444
+ }
445
+
446
+ /*
447
+ * Fetch a rational item from the file
448
+ * at offset off and return the value
449
+ * as a floating point number.
450
+ */
451
+ static float
452
+ TIFFFetchRational(TIFF* tif, TIFFDirEntry* dir)
453
+ {
454
+ uint32 l[2];
455
+ float v;
456
+
457
+ return (!TIFFFetchData(tif, dir, (char *)l) ||
458
+ !cvtRational(tif, dir, l[0], l[1], &v) ? 1.0f : v);
459
+ }
460
+
461
+ /*
462
+ * Fetch a single floating point value
463
+ * from the offset field and return it
464
+ * as a native float.
465
+ */
466
+ static float
467
+ TIFFFetchFloat(TIFF* tif, TIFFDirEntry* dir)
468
+ {
469
+ /* This appears to be a flagrant bug in the TIFF library, yet I
470
+ actually don't understand how it could have ever worked the old
471
+ way. Look at the comments in my new code and you'll understand. */
472
+ #if (0)
473
+ float v = (float)
474
+ TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset);
475
+ TIFFCvtIEEEFloatToNative(tif, 1, &v);
476
+ #else
477
+ float v;
478
+ /* This is a little bit tricky - if we just cast the uint32 to a float,
479
+ C will perform a numerical conversion, which is not what we want.
480
+ We want to take the actual bit pattern in the uint32 and interpret
481
+ it as a float. Thus we cast a uint32 * into a float * and then
482
+ dereference to get v. */
483
+ uint32 l = (uint32)
484
+ TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset);
485
+ v = * (float *) &l;
486
+ TIFFCvtIEEEFloatToNative(tif, 1, &v);
487
+ #endif
488
+ return (v);
489
+
490
+ }
491
+
492
+ /*
493
+ * Fetch an array of BYTE or SBYTE values.
494
+ */
495
+ static int
496
+ TIFFFetchByteArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
497
+ {
498
+ if (dir->tdir_count <= 4) {
499
+ /*
500
+ * Extract data from offset field.
501
+ */
502
+ if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
503
+ switch (dir->tdir_count) {
504
+ case 4: v[3] = dir->tdir_offset & 0xff;
505
+ case 3: v[2] = (dir->tdir_offset >> 8) & 0xff;
506
+ case 2: v[1] = (dir->tdir_offset >> 16) & 0xff;
507
+ case 1: v[0] = dir->tdir_offset >> 24;
508
+ }
509
+ } else {
510
+ switch (dir->tdir_count) {
511
+ case 4: v[3] = dir->tdir_offset >> 24;
512
+ case 3: v[2] = (dir->tdir_offset >> 16) & 0xff;
513
+ case 2: v[1] = (dir->tdir_offset >> 8) & 0xff;
514
+ case 1: v[0] = dir->tdir_offset & 0xff;
515
+ }
516
+ }
517
+ return (1);
518
+ } else
519
+ return (TIFFFetchData(tif, dir, (char*) v) != 0); /* XXX */
520
+ }
521
+
522
+ /*
523
+ * Fetch an array of SHORT or SSHORT values.
524
+ */
525
+ static int
526
+ TIFFFetchShortArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
527
+ {
528
+ if (dir->tdir_count <= 2) {
529
+ if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
530
+ switch (dir->tdir_count) {
531
+ case 2: v[1] = dir->tdir_offset & 0xffff;
532
+ case 1: v[0] = dir->tdir_offset >> 16;
533
+ }
534
+ } else {
535
+ switch (dir->tdir_count) {
536
+ case 2: v[1] = dir->tdir_offset >> 16;
537
+ case 1: v[0] = dir->tdir_offset & 0xffff;
538
+ }
539
+ }
540
+ return (1);
541
+ } else
542
+ return (TIFFFetchData(tif, dir, (char *)v) != 0);
543
+ }
544
+
545
+ /*
546
+ * Fetch a pair of SHORT or BYTE values.
547
+ */
548
+ static int
549
+ TIFFFetchShortPair(TIFF* tif, TIFFDirEntry* dir)
550
+ {
551
+ uint16 v[2];
552
+ int ok = 0;
553
+
554
+ switch (dir->tdir_type) {
555
+ case TIFF_SHORT:
556
+ case TIFF_SSHORT:
557
+ ok = TIFFFetchShortArray(tif, dir, v);
558
+ break;
559
+ case TIFF_BYTE:
560
+ case TIFF_SBYTE:
561
+ ok = TIFFFetchByteArray(tif, dir, v);
562
+ break;
563
+ }
564
+ if (ok)
565
+ TIFFSetField(tif, dir->tdir_tag, v[0], v[1]);
566
+ return (ok);
567
+ }
568
+
569
+ /*
570
+ * Fetch an array of LONG or SLONG values.
571
+ */
572
+ static int
573
+ TIFFFetchLongArray(TIFF* tif, TIFFDirEntry* dir, uint32* v)
574
+ {
575
+ if (dir->tdir_count == 1) {
576
+ v[0] = dir->tdir_offset;
577
+ return (1);
578
+ } else
579
+ return (TIFFFetchData(tif, dir, (char*) v) != 0);
580
+ }
581
+
582
+ /*
583
+ * Fetch an array of RATIONAL or SRATIONAL values.
584
+ */
585
+ static int
586
+ TIFFFetchRationalArray(TIFF* tif, TIFFDirEntry* dir, float* v)
587
+ {
588
+ int ok = 0;
589
+ uint32* l;
590
+
591
+ l = (uint32*)CheckMalloc(tif,
592
+ dir->tdir_count*TIFFDataWidth(dir->tdir_type),
593
+ "to fetch array of rationals");
594
+ if (l) {
595
+ if (TIFFFetchData(tif, dir, (char *)l)) {
596
+ uint32 i;
597
+ for (i = 0; i < dir->tdir_count; i++) {
598
+ ok = cvtRational(tif, dir,
599
+ l[2*i+0], l[2*i+1], &v[i]);
600
+ if (!ok)
601
+ break;
602
+ }
603
+ }
604
+ _TIFFfree((char *)l);
605
+ }
606
+ return (ok);
607
+ }
608
+
609
+ /*
610
+ * Fetch an array of FLOAT values.
611
+ */
612
+ static int
613
+ TIFFFetchFloatArray(TIFF* tif, TIFFDirEntry* dir, float* v)
614
+ {
615
+
616
+ if (dir->tdir_count == 1) {
617
+ v[0] = *(float*) &dir->tdir_offset;
618
+ TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
619
+ return (1);
620
+ } else if (TIFFFetchData(tif, dir, (char*) v)) {
621
+ TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
622
+ return (1);
623
+ } else
624
+ return (0);
625
+ }
626
+
627
+ /*
628
+ * Fetch an array of DOUBLE values.
629
+ */
630
+ static int
631
+ TIFFFetchDoubleArray(TIFF* tif, TIFFDirEntry* dir, double* v)
632
+ {
633
+ if (TIFFFetchData(tif, dir, (char*) v)) {
634
+ TIFFCvtIEEEDoubleToNative(tif, dir->tdir_count, v);
635
+ return (1);
636
+ } else
637
+ return (0);
638
+ }
639
+
640
+ /*
641
+ * Fetch an array of ANY values. The actual values are
642
+ * returned as doubles which should be able hold all the
643
+ * types. Yes, there really should be an tany_t to avoid
644
+ * this potential non-portability ... Note in particular
645
+ * that we assume that the double return value vector is
646
+ * large enough to read in any fundamental type. We use
647
+ * that vector as a buffer to read in the base type vector
648
+ * and then convert it in place to double (from end
649
+ * to front of course).
650
+ */
651
+ static int
652
+ TIFFFetchAnyArray(TIFF* tif, TIFFDirEntry* dir, double* v)
653
+ {
654
+ int i;
655
+
656
+ switch (dir->tdir_type) {
657
+ case TIFF_BYTE:
658
+ case TIFF_SBYTE:
659
+ if (!TIFFFetchByteArray(tif, dir, (uint16*) v))
660
+ return (0);
661
+ if (dir->tdir_type == TIFF_BYTE) {
662
+ uint16* vp = (uint16*) v;
663
+ for (i = dir->tdir_count-1; i >= 0; i--)
664
+ v[i] = vp[i];
665
+ } else {
666
+ int16* vp = (int16*) v;
667
+ for (i = dir->tdir_count-1; i >= 0; i--)
668
+ v[i] = vp[i];
669
+ }
670
+ break;
671
+ case TIFF_SHORT:
672
+ case TIFF_SSHORT:
673
+ if (!TIFFFetchShortArray(tif, dir, (uint16*) v))
674
+ return (0);
675
+ if (dir->tdir_type == TIFF_SHORT) {
676
+ uint16* vp = (uint16*) v;
677
+ for (i = dir->tdir_count-1; i >= 0; i--)
678
+ v[i] = vp[i];
679
+ } else {
680
+ int16* vp = (int16*) v;
681
+ for (i = dir->tdir_count-1; i >= 0; i--)
682
+ v[i] = vp[i];
683
+ }
684
+ break;
685
+ case TIFF_LONG:
686
+ case TIFF_SLONG:
687
+ if (!TIFFFetchLongArray(tif, dir, (uint32*) v))
688
+ return (0);
689
+ if (dir->tdir_type == TIFF_LONG) {
690
+ uint32* vp = (uint32*) v;
691
+ for (i = dir->tdir_count-1; i >= 0; i--)
692
+ v[i] = vp[i];
693
+ } else {
694
+ int32* vp = (int32*) v;
695
+ for (i = dir->tdir_count-1; i >= 0; i--)
696
+ v[i] = vp[i];
697
+ }
698
+ break;
699
+ case TIFF_RATIONAL:
700
+ case TIFF_SRATIONAL:
701
+ if (!TIFFFetchRationalArray(tif, dir, (float*) v))
702
+ return (0);
703
+ { float* vp = (float*) v;
704
+ for (i = dir->tdir_count-1; i >= 0; i--)
705
+ v[i] = vp[i];
706
+ }
707
+ break;
708
+ case TIFF_FLOAT:
709
+ if (!TIFFFetchFloatArray(tif, dir, (float*) v))
710
+ return (0);
711
+ { float* vp = (float*) v;
712
+ for (i = dir->tdir_count-1; i >= 0; i--)
713
+ v[i] = vp[i];
714
+ }
715
+ break;
716
+ case TIFF_DOUBLE:
717
+ return (TIFFFetchDoubleArray(tif, dir, (double*) v));
718
+ default:
719
+ /* TIFF_NOTYPE */
720
+ /* TIFF_ASCII */
721
+ /* TIFF_UNDEFINED */
722
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
723
+ "Cannot read TIFF_ANY type %d for field \"%s\"",
724
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
725
+ return (0);
726
+ }
727
+ return (1);
728
+ }
729
+
730
+
731
+ /*
732
+ * Fetch a tag that is not handled by special case code.
733
+ */
734
+ /* The standard function TIFFFetchNormalTag() could definitely be replaced
735
+ with a simple call to this function, just adding TIFFSetField() as the
736
+ last argument. */
737
+ static int
738
+ TIFFFetchNormalSubTag(TIFF* tif, TIFFDirEntry* dp, const TIFFFieldInfo* fip,
739
+ int (*setFieldFn)(TIFF *tif, ttag_t tag, ...))
740
+ {
741
+ static char mesg[] = "to fetch tag value";
742
+ int ok = 0;
743
+
744
+ if (dp->tdir_count > 1) { /* array of values */
745
+ char* cp = NULL;
746
+
747
+ switch (dp->tdir_type) {
748
+ case TIFF_BYTE:
749
+ case TIFF_SBYTE:
750
+ /* NB: always expand BYTE values to shorts */
751
+ cp = CheckMalloc(tif,
752
+ dp->tdir_count * sizeof (uint16), mesg);
753
+ ok = cp && TIFFFetchByteArray(tif, dp, (uint16*) cp);
754
+ break;
755
+ case TIFF_SHORT:
756
+ case TIFF_SSHORT:
757
+ cp = CheckMalloc(tif,
758
+ dp->tdir_count * sizeof (uint16), mesg);
759
+ ok = cp && TIFFFetchShortArray(tif, dp, (uint16*) cp);
760
+ break;
761
+ case TIFF_LONG:
762
+ case TIFF_SLONG:
763
+ cp = CheckMalloc(tif,
764
+ dp->tdir_count * sizeof (uint32), mesg);
765
+ ok = cp && TIFFFetchLongArray(tif, dp, (uint32*) cp);
766
+ break;
767
+ case TIFF_RATIONAL:
768
+ case TIFF_SRATIONAL:
769
+ cp = CheckMalloc(tif,
770
+ dp->tdir_count * sizeof (float), mesg);
771
+ ok = cp && TIFFFetchRationalArray(tif, dp, (float*) cp);
772
+ break;
773
+ case TIFF_FLOAT:
774
+ cp = CheckMalloc(tif,
775
+ dp->tdir_count * sizeof (float), mesg);
776
+ ok = cp && TIFFFetchFloatArray(tif, dp, (float*) cp);
777
+ break;
778
+ case TIFF_DOUBLE:
779
+ cp = CheckMalloc(tif,
780
+ dp->tdir_count * sizeof (double), mesg);
781
+ ok = cp && TIFFFetchDoubleArray(tif, dp, (double*) cp);
782
+ break;
783
+ case TIFF_ASCII:
784
+ case TIFF_UNDEFINED: /* bit of a cheat... */
785
+ /*
786
+ * Some vendors write strings w/o the trailing
787
+ * NULL byte, so always append one just in case.
788
+ */
789
+ cp = CheckMalloc(tif, dp->tdir_count+1, mesg);
790
+ if (ok = (cp && TIFFFetchString(tif, dp, cp)))
791
+ cp[dp->tdir_count] = '\0'; /* XXX */
792
+ break;
793
+ }
794
+ if (ok) {
795
+ ok = (fip->field_passcount ?
796
+ (*setFieldFn)(tif, dp->tdir_tag, dp->tdir_count, cp)
797
+ : (*setFieldFn)(tif, dp->tdir_tag, cp));
798
+ }
799
+ if (cp != NULL)
800
+ _TIFFfree(cp);
801
+ } else if (CheckDirCount(tif, dp, 1)) { /* singleton value */
802
+ switch (dp->tdir_type) {
803
+ case TIFF_BYTE:
804
+ case TIFF_SBYTE:
805
+ case TIFF_SHORT:
806
+ case TIFF_SSHORT:
807
+ /*
808
+ * If the tag is also acceptable as a LONG or SLONG
809
+ * then (*setFieldFn) will expect an uint32 parameter
810
+ * passed to it (through varargs). Thus, for machines
811
+ * where sizeof (int) != sizeof (uint32) we must do
812
+ * a careful check here. It's hard to say if this
813
+ * is worth optimizing.
814
+ *
815
+ * NB: We use TIFFFieldWithTag here knowing that
816
+ * it returns us the first entry in the table
817
+ * for the tag and that that entry is for the
818
+ * widest potential data type the tag may have.
819
+ */
820
+ { TIFFDataType type = fip->field_type;
821
+ if (type != TIFF_LONG && type != TIFF_SLONG) {
822
+ uint16 v = (uint16)
823
+ TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
824
+ ok = (fip->field_passcount ?
825
+ (*setFieldFn)(tif, dp->tdir_tag, 1, &v)
826
+ : (*setFieldFn)(tif, dp->tdir_tag, v));
827
+ break;
828
+ }
829
+ }
830
+ /* fall thru... */
831
+ case TIFF_LONG:
832
+ case TIFF_SLONG:
833
+ { uint32 v32 =
834
+ TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
835
+ ok = (fip->field_passcount ?
836
+ (*setFieldFn)(tif, dp->tdir_tag, 1, &v32)
837
+ : (*setFieldFn)(tif, dp->tdir_tag, v32));
838
+ }
839
+ break;
840
+ case TIFF_RATIONAL:
841
+ case TIFF_SRATIONAL:
842
+ case TIFF_FLOAT:
843
+ { float v = (dp->tdir_type == TIFF_FLOAT ?
844
+ TIFFFetchFloat(tif, dp)
845
+ : TIFFFetchRational(tif, dp));
846
+ ok = (fip->field_passcount ?
847
+ (*setFieldFn)(tif, dp->tdir_tag, 1, &v)
848
+ : (*setFieldFn)(tif, dp->tdir_tag, v));
849
+ }
850
+ break;
851
+ case TIFF_DOUBLE:
852
+ { double v;
853
+ ok = (TIFFFetchDoubleArray(tif, dp, &v) &&
854
+ (fip->field_passcount ?
855
+ (*setFieldFn)(tif, dp->tdir_tag, 1, &v)
856
+ : (*setFieldFn)(tif, dp->tdir_tag, v))
857
+ );
858
+ }
859
+ break;
860
+ case TIFF_ASCII:
861
+ case TIFF_UNDEFINED: /* bit of a cheat... */
862
+ { char c[2];
863
+ if (ok = (TIFFFetchString(tif, dp, c) != 0)) {
864
+ c[1] = '\0'; /* XXX paranoid */
865
+ ok = (*setFieldFn)(tif, dp->tdir_tag, c);
866
+ }
867
+ }
868
+ break;
869
+ }
870
+ }
871
+ return (ok);
872
+ }
873
+
874
+ /* Everything after this is exactly duplicated from the standard tif_dirread.c
875
+ file, necessitated by the fact that they are declared static there so
876
+ we can't call them!
877
+ */
878
+ #define NITEMS(x) (sizeof (x) / sizeof (x[0]))
879
+ /*
880
+ * Fetch samples/pixel short values for
881
+ * the specified tag and verify that
882
+ * all values are the same.
883
+ */
884
+ static int
885
+ TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, int* pl)
886
+ {
887
+ int samples = tif->tif_dir.td_samplesperpixel;
888
+ int status = 0;
889
+
890
+ if (CheckDirCount(tif, dir, (uint32) samples)) {
891
+ uint16 buf[10];
892
+ uint16* v = buf;
893
+
894
+ if (samples > NITEMS(buf))
895
+ v = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
896
+ if (TIFFFetchShortArray(tif, dir, v)) {
897
+ int i;
898
+ for (i = 1; i < samples; i++)
899
+ if (v[i] != v[0]) {
900
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
901
+ "Cannot handle different per-sample values for field \"%s\"",
902
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
903
+ goto bad;
904
+ }
905
+ *pl = v[0];
906
+ status = 1;
907
+ }
908
+ bad:
909
+ if (v != buf)
910
+ _TIFFfree((char*) v);
911
+ }
912
+ return (status);
913
+ }
914
+
915
+ /*
916
+ * Fetch samples/pixel ANY values for
917
+ * the specified tag and verify that
918
+ * all values are the same.
919
+ */
920
+ static int
921
+ TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl)
922
+ {
923
+ int samples = (int) tif->tif_dir.td_samplesperpixel;
924
+ int status = 0;
925
+
926
+ if (CheckDirCount(tif, dir, (uint32) samples)) {
927
+ double buf[10];
928
+ double* v = buf;
929
+
930
+ if (samples > NITEMS(buf))
931
+ v = (double*) _TIFFmalloc(samples * sizeof (double));
932
+ if (TIFFFetchAnyArray(tif, dir, v)) {
933
+ int i;
934
+ for (i = 1; i < samples; i++)
935
+ if (v[i] != v[0]) {
936
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
937
+ "Cannot handle different per-sample values for field \"%s\"",
938
+ _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
939
+ goto bad;
940
+ }
941
+ *pl = v[0];
942
+ status = 1;
943
+ }
944
+ bad:
945
+ if (v != buf)
946
+ _TIFFfree(v);
947
+ }
948
+ return (status);
949
+ }
950
+ #undef NITEMS
951
+
952
+ /*
953
+ * Fetch a set of offsets or lengths.
954
+ * While this routine says "strips",
955
+ * in fact it's also used for tiles.
956
+ */
957
+ static int
958
+ TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
959
+ {
960
+ register uint32* lp;
961
+ int status;
962
+
963
+ if (!CheckDirCount(tif, dir, (uint32) nstrips))
964
+ return (0);
965
+ /*
966
+ * Allocate space for strip information.
967
+ */
968
+ if (*lpp == NULL &&
969
+ (*lpp = (uint32 *)CheckMalloc(tif,
970
+ nstrips * sizeof (uint32), "for strip array")) == NULL)
971
+ return (0);
972
+ lp = *lpp;
973
+ if (dir->tdir_type == (int)TIFF_SHORT) {
974
+ /*
975
+ * Handle uint16->uint32 expansion.
976
+ */
977
+ uint16* dp = (uint16*) CheckMalloc(tif,
978
+ dir->tdir_count* sizeof (uint16), "to fetch strip tag");
979
+ if (dp == NULL)
980
+ return (0);
981
+ if (status = TIFFFetchShortArray(tif, dir, dp)) {
982
+ register uint16* wp = dp;
983
+ while (nstrips-- > 0)
984
+ *lp++ = *wp++;
985
+ }
986
+ _TIFFfree((char*) dp);
987
+ } else
988
+ status = TIFFFetchLongArray(tif, dir, lp);
989
+ return (status);
990
+ }
991
+
992
+ #define NITEMS(x) (sizeof (x) / sizeof (x[0]))
993
+ /*
994
+ * Fetch and set the ExtraSamples tag.
995
+ */
996
+ static int
997
+ TIFFFetchExtraSamples(TIFF* tif, TIFFDirEntry* dir)
998
+ {
999
+ uint16 buf[10];
1000
+ uint16* v = buf;
1001
+ int status;
1002
+
1003
+ if (dir->tdir_count > NITEMS(buf))
1004
+ v = (uint16*) _TIFFmalloc(dir->tdir_count * sizeof (uint16));
1005
+ if (dir->tdir_type == TIFF_BYTE)
1006
+ status = TIFFFetchByteArray(tif, dir, v);
1007
+ else
1008
+ status = TIFFFetchShortArray(tif, dir, v);
1009
+ if (status)
1010
+ status = TIFFSetField(tif, dir->tdir_tag, dir->tdir_count, v);
1011
+ if (v != buf)
1012
+ _TIFFfree((char*) v);
1013
+ return (status);
1014
+ }
1015
+ #undef NITEMS
1016
+
1017
+ #ifdef COLORIMETRY_SUPPORT
1018
+ /*
1019
+ * Fetch and set the RefBlackWhite tag.
1020
+ */
1021
+ static int
1022
+ TIFFFetchRefBlackWhite(TIFF* tif, TIFFDirEntry* dir)
1023
+ {
1024
+ static char mesg[] = "for \"ReferenceBlackWhite\" array";
1025
+ char* cp;
1026
+ int ok;
1027
+
1028
+ if (dir->tdir_type == TIFF_RATIONAL)
1029
+ return (1/*TIFFFetchNormalTag(tif, dir) just so linker won't complain - this part of the code is never used anyway */);
1030
+ /*
1031
+ * Handle LONG's for backward compatibility.
1032
+ */
1033
+ cp = CheckMalloc(tif, dir->tdir_count * sizeof (uint32), mesg);
1034
+ if (ok = (cp && TIFFFetchLongArray(tif, dir, (uint32*) cp))) {
1035
+ float* fp = (float*)
1036
+ CheckMalloc(tif, dir->tdir_count * sizeof (float), mesg);
1037
+ if (ok = (fp != NULL)) {
1038
+ uint32 i;
1039
+ for (i = 0; i < dir->tdir_count; i++)
1040
+ fp[i] = (float)((uint32*) cp)[i];
1041
+ ok = TIFFSetField(tif, dir->tdir_tag, fp);
1042
+ _TIFFfree((char*) fp);
1043
+ }
1044
+ }
1045
+ if (cp)
1046
+ _TIFFfree(cp);
1047
+ return (ok);
1048
+ }
1049
+ #endif
1050
+
1051
+ #if STRIPCHOP_SUPPORT
1052
+ /*
1053
+ * Replace a single strip (tile) of uncompressed data by
1054
+ * multiple strips (tiles), each approximately 8Kbytes.
1055
+ * This is useful for dealing with large images or
1056
+ * for dealing with machines with a limited amount
1057
+ * memory.
1058
+ */
1059
+ static void
1060
+ ChopUpSingleUncompressedStrip(TIFF* tif)
1061
+ {
1062
+ register TIFFDirectory *td = &tif->tif_dir;
1063
+ uint32 bytecount = td->td_stripbytecount[0];
1064
+ uint32 offset = td->td_stripoffset[0];
1065
+ tsize_t rowbytes = TIFFVTileSize(tif, 1), stripbytes;
1066
+ tstrip_t strip, nstrips, rowsperstrip;
1067
+ uint32* newcounts;
1068
+ uint32* newoffsets;
1069
+
1070
+ /*
1071
+ * Make the rows hold at least one
1072
+ * scanline, but fill 8k if possible.
1073
+ */
1074
+ if (rowbytes > 8192) {
1075
+ stripbytes = rowbytes;
1076
+ rowsperstrip = 1;
1077
+ } else {
1078
+ rowsperstrip = 8192 / rowbytes;
1079
+ stripbytes = rowbytes * rowsperstrip;
1080
+ }
1081
+ /* never increase the number of strips in an image */
1082
+ if (rowsperstrip >= td->td_rowsperstrip)
1083
+ return;
1084
+ nstrips = (tstrip_t) TIFFhowmany(bytecount, stripbytes);
1085
+ newcounts = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
1086
+ "for chopped \"StripByteCounts\" array");
1087
+ newoffsets = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
1088
+ "for chopped \"StripOffsets\" array");
1089
+ if (newcounts == NULL || newoffsets == NULL) {
1090
+ /*
1091
+ * Unable to allocate new strip information, give
1092
+ * up and use the original one strip information.
1093
+ */
1094
+ if (newcounts != NULL)
1095
+ _TIFFfree(newcounts);
1096
+ if (newoffsets != NULL)
1097
+ _TIFFfree(newoffsets);
1098
+ return;
1099
+ }
1100
+ /*
1101
+ * Fill the strip information arrays with
1102
+ * new bytecounts and offsets that reflect
1103
+ * the broken-up format.
1104
+ */
1105
+ for (strip = 0; strip < nstrips; strip++) {
1106
+ if (stripbytes > bytecount)
1107
+ stripbytes = bytecount;
1108
+ newcounts[strip] = stripbytes;
1109
+ newoffsets[strip] = offset;
1110
+ offset += stripbytes;
1111
+ bytecount -= stripbytes;
1112
+ }
1113
+ /*
1114
+ * Replace old single strip info with multi-strip info.
1115
+ */
1116
+ td->td_stripsperimage = td->td_nstrips = nstrips;
1117
+ TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
1118
+
1119
+ _TIFFfree(td->td_stripbytecount);
1120
+ _TIFFfree(td->td_stripoffset);
1121
+ td->td_stripbytecount = newcounts;
1122
+ td->td_stripoffset = newoffsets;
1123
+ }
1124
+ #endif /* STRIPCHOP_SUPPORT */
1125
+ /*
1126
+ * Local Variables:
1127
+ * mode: c
1128
+ * c-basic-offset: 8
1129
+ * fill-column: 78
1130
+ * End:
1131
+ */