laag-libtiff 4.0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +57 -0
- data/LICENSE.txt +21 -0
- data/README.org +34 -0
- data/ext/laag/libtiff/extconf.rb +13 -0
- data/laag-libtiff.gemspec +20 -0
- data/lib/laag/libtiff.rb +29 -0
- data/vendor/gitlab.com/libtiff/libtiff/.appveyor.yml +109 -0
- data/vendor/gitlab.com/libtiff/libtiff/.cvsignore +4 -0
- data/vendor/gitlab.com/libtiff/libtiff/.travis.yml +34 -0
- data/vendor/gitlab.com/libtiff/libtiff/CMakeLists.txt +764 -0
- data/vendor/gitlab.com/libtiff/libtiff/COMMITTERS +19 -0
- data/vendor/gitlab.com/libtiff/libtiff/COPYRIGHT +21 -0
- data/vendor/gitlab.com/libtiff/libtiff/ChangeLog +8073 -0
- data/vendor/gitlab.com/libtiff/libtiff/HOWTO-RELEASE +119 -0
- data/vendor/gitlab.com/libtiff/libtiff/HOWTO-SECURITY-RELEASE +19 -0
- data/vendor/gitlab.com/libtiff/libtiff/Makefile.am +91 -0
- data/vendor/gitlab.com/libtiff/libtiff/Makefile.in +995 -0
- data/vendor/gitlab.com/libtiff/libtiff/Makefile.vc +58 -0
- data/vendor/gitlab.com/libtiff/libtiff/README +61 -0
- data/vendor/gitlab.com/libtiff/libtiff/README.vms +12 -0
- data/vendor/gitlab.com/libtiff/libtiff/RELEASE-DATE +1 -0
- data/vendor/gitlab.com/libtiff/libtiff/SConstruct +171 -0
- data/vendor/gitlab.com/libtiff/libtiff/TODO +12 -0
- data/vendor/gitlab.com/libtiff/libtiff/VERSION +1 -0
- data/vendor/gitlab.com/libtiff/libtiff/aclocal.m4 +1194 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/bmp2tiff.1.html +121 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/gif2tiff.1.html +141 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/ras2tiff.1.html +139 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/sgi2tiff.1.html +147 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/html/man/tiffsv.1.html +207 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/man/bmp2tiff.1 +85 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/man/gif2tiff.1 +81 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/man/ras2tiff.1 +96 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/man/sgi2tiff.1 +93 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/man/tiffsv.1 +142 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/tools/bmp2tiff.c +937 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/tools/gif2tiff.c +591 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/tools/ras2tiff.c +338 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/tools/rasterfile.h +44 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/tools/sgi2tiff.c +337 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/tools/sgisv.c +318 -0
- data/vendor/gitlab.com/libtiff/libtiff/archive/tools/ycbcr.c +168 -0
- data/vendor/gitlab.com/libtiff/libtiff/autogen.sh +8 -0
- data/vendor/gitlab.com/libtiff/libtiff/build/.cvsignore +1 -0
- data/vendor/gitlab.com/libtiff/libtiff/build/CMakeLists.txt +25 -0
- data/vendor/gitlab.com/libtiff/libtiff/build/Makefile.am +32 -0
- data/vendor/gitlab.com/libtiff/libtiff/build/Makefile.in +680 -0
- data/vendor/gitlab.com/libtiff/libtiff/build/README +3 -0
- data/vendor/gitlab.com/libtiff/libtiff/build/travis-ci +108 -0
- data/vendor/gitlab.com/libtiff/libtiff/commit +233 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/compile +347 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/config.guess +1526 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/config.sub +1658 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/depcomp +791 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/install-sh +507 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/ltmain.sh +11156 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/missing +215 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/mkinstalldirs +161 -0
- data/vendor/gitlab.com/libtiff/libtiff/config/test-driver +127 -0
- data/vendor/gitlab.com/libtiff/libtiff/configure +23612 -0
- data/vendor/gitlab.com/libtiff/libtiff/configure.ac +1112 -0
- data/vendor/gitlab.com/libtiff/libtiff/configure.com +1357 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/CMakeLists.txt +35 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/Makefile.am +31 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/Makefile.in +679 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/README +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/.cvsignore +5 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/CMakeLists.txt +34 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/Makefile.am +39 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/Makefile.in +652 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/Makefile.vc +28 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/README +142 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/addtiffo.c +181 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/tif_overview.c +916 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/tif_ovrcache.c +344 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/addtiffo/tif_ovrcache.h +103 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/.cvsignore +8 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/CMakeLists.txt +43 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/Makefile.am +46 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/Makefile.in +798 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/README +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-bi.c +91 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-grayscale.c +147 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-palette.c +284 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/tiff-rgb.c +201 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/CMakeLists.txt +29 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/Makefile.am +47 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/Makefile.in +516 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/README +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/patchlevel.h +8 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/xtiff.c +1290 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/dbs/xtiff/xtifficon.h +21 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/.cvsignore +5 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/CMakeLists.txt +35 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/Makefile.am +40 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/Makefile.in +650 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/README +25 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/iptcutil.c +954 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/test.iptc +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/iptcutil/test.txt +32 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/CMakeLists.txt +27 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/Makefile.am +29 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/Makefile.in +499 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/README +37 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/mfs/mfs_file.c +586 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/CMakeLists.txt +30 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/Makefile.am +32 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/Makefile.in +502 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/README +90 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_imageiter.c +525 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_imageiter.h +64 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_pdsdirread.c +1131 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/pds/tif_pdsdirwrite.c +971 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/CMakeLists.txt +28 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/Makefile.am +30 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/Makefile.in +500 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/README +10 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/ras2tif.c +254 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/ras/tif2ras.c +344 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/CMakeLists.txt +28 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/Makefile.am +30 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/Makefile.in +500 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/README +30 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/tiffstream.cpp +238 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/stream/tiffstream.h +70 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/CMakeLists.txt +32 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/Makefile.am +33 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/Makefile.in +503 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/README +132 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/listtif.c +39 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/maketif.c +77 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/xtif_dir.c +350 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/xtiffio.h +59 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/tags/xtiffiop.h +72 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/CMakeLists.txt +30 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Makefile.am +32 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Makefile.in +502 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Makefile.w95 +134 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/README.Tiffile +31 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/README.tiff2dib +51 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/Tiffile.cpp +449 -0
- data/vendor/gitlab.com/libtiff/libtiff/contrib/win_dib/tiff2dib.c +379 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/.cvsignore +5 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/BigTIFFProposal.html +99 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/CMakeLists.txt +87 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/Makefile.am +96 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/Makefile.in +798 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/TIFFTechNote2.html +707 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/addingtags.html +292 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffdesign.html +80 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr.html +77 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/esri.png +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/leica.png +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/safe.png +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/bigtiffpr_images/weogeo.png +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/bugs.html +61 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/build.html +737 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/contrib.html +209 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/document.html +52 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images.html +41 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/CMakeLists.txt +46 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/Makefile.am +49 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/Makefile.in +572 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/back.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/bali.jpg +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/cat.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/cover.jpg +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/cramps.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/dave.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/info.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/jello.jpg +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/jim.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/note.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/oxford.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/quad.jpg +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/ring.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/smallliz.jpg +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/strike.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/images/warning.gif +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/index.html +122 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/internals.html +572 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/intro.html +68 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/libtiff.html +747 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/.cvsignore +2 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/CMakeLists.txt +108 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/HtmlDoc.cmake +50 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/Makefile.am +122 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/Makefile.in +642 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFClose.3tiff.html +87 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFDataWidth.3tiff.html +98 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFError.3tiff.html +106 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldDataType.3tiff.html +89 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldName.3tiff.html +86 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldPassCount.3tiff.html +98 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldReadCount.3tiff.html +101 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldTag.3tiff.html +88 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFieldWriteCount.3tiff.html +108 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFFlush.3tiff.html +113 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFGetField.3tiff.html +1969 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFOpen.3tiff.html +421 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFPrintDirectory.3tiff.html +225 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFRGBAImage.3tiff.html +319 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadDirectory.3tiff.html +218 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadEncodedStrip.3tiff.html +133 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadEncodedTile.3tiff.html +130 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRGBAImage.3tiff.html +301 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRGBAStrip.3tiff.html +208 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRGBATile.3tiff.html +261 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRawStrip.3tiff.html +109 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadRawTile.3tiff.html +111 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadScanline.3tiff.html +157 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFReadTile.3tiff.html +133 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFSetDirectory.3tiff.html +122 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFSetField.3tiff.html +1865 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWarning.3tiff.html +108 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteDirectory.3tiff.html +176 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteEncodedStrip.3tiff.html +153 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteEncodedTile.3tiff.html +147 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteRawStrip.3tiff.html +144 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteRawTile.3tiff.html +128 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteScanline.3tiff.html +206 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFWriteTile.3tiff.html +115 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFbuffer.3tiff.html +116 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFcodec.3tiff.html +116 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFcolor.3tiff.html +975 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFmemory.3tiff.html +110 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFquery.3tiff.html +148 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFsize.3tiff.html +95 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFstrip.3tiff.html +129 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFswab.3tiff.html +110 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/TIFFtile.3tiff.html +141 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/fax2ps.1.html +252 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/fax2tiff.1.html +607 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/index.html +64 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/libtiff.3tiff.html +1150 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/pal2rgb.1.html +189 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/ppm2tiff.1.html +141 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/raw2tiff.1.html +510 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/rgb2ycbcr.1.html +155 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/thumbnail.1.html +148 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2bw.1.html +161 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2pdf.1.html +609 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2ps.1.html +639 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiff2rgba.1.html +162 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffcmp.1.html +156 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffcp.1.html +569 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffcrop.1.html +684 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffdither.1.html +196 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffdump.1.html +145 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffgt.1.html +551 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffinfo.1.html +196 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffmedian.1.html +183 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffset.1.html +176 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/man/tiffsplit.1.html +102 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/misc.html +117 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/support.html +655 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/tools.html +137 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta007.html +112 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta016.html +122 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta018.html +84 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta024.html +139 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta028.html +146 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta029.html +86 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta031.html +94 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta032.html +90 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta033.html +82 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta034.html +68 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta035.html +63 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.4beta036.html +117 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.1.html +75 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.2.html +108 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.3.html +132 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.4.html +88 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.5.html +155 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.6-beta.html +185 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.5.7.html +259 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.6.0.html +434 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.6.1.html +199 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0.html +144 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0alpha.html +249 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0beta.html +162 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.0beta2.html +131 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.1.html +233 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.2.html +222 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.3.html +230 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.7.4.html +133 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.8.0.html +199 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.8.1.html +217 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.8.2.html +137 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.0.html +261 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.0beta.html +304 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.1.html +115 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.2.html +122 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.3.html +160 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.4.html +125 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v3.9.5.html +270 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.0.html +269 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.1.html +113 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.2.html +118 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.3.html +125 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.4.html +274 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.4beta.html +291 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.5.html +148 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.6.html +139 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.7.html +411 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.8.html +445 -0
- data/vendor/gitlab.com/libtiff/libtiff/html/v4.0.9.html +373 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff-4.pc.in +11 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/.cvsignore +22 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/CMakeLists.txt +165 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.am +154 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.in +966 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.lcc +129 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/Makefile.vc +102 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/SConstruct +73 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/libtiff.def +168 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/libtiff.map +4 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/libtiffxx.map +4 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/mkg3states.c +454 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/mkspans.c +82 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/t4.h +292 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_aux.c +376 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_close.c +140 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_codec.c +165 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_color.c +309 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_compress.c +304 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.h-vms +46 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.h.cmake.in +261 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.h.in +410 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.vc.h +137 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_config.wince.h +71 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dir.c +1767 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dir.h +309 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dirinfo.c +1070 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dirread.c +5803 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dirwrite.c +3024 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_dumpmode.c +143 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_error.c +88 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_extension.c +118 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_fax3.c +1648 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_fax3.h +540 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_fax3sm.c +1260 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_flush.c +118 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_getimage.c +3048 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_jbig.c +214 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_jpeg.c +2601 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_jpeg_12.c +69 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_luv.c +1765 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_lzma.c +495 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_lzw.c +1218 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_next.c +189 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_ojpeg.c +2563 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_open.c +725 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_packbits.c +311 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_pixarlog.c +1485 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_predict.c +881 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_predict.h +79 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_print.c +722 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_read.c +1572 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_stream.cxx +430 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_strip.c +389 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_swab.c +312 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_thunder.c +208 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_tile.c +322 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_unix.c +386 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_version.c +40 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_vms.c +611 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_warning.c +89 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_win32.c +476 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_wince.c +293 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_write.c +834 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tif_zip.c +476 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiff.h +681 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.h-vms +99 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.h.cmake.in +130 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.h.in +127 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.vc.h +161 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffconf.wince.h +121 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffio.h +560 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffio.hxx +49 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffiop.h +445 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffvers.h +9 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/tiffvers.h.in +9 -0
- data/vendor/gitlab.com/libtiff/libtiff/libtiff/uvcode.h +180 -0
- data/vendor/gitlab.com/libtiff/libtiff/m4/acinclude.m4 +851 -0
- data/vendor/gitlab.com/libtiff/libtiff/m4/ice_find_athena.m4 +187 -0
- data/vendor/gitlab.com/libtiff/libtiff/m4/libtool.m4 +8388 -0
- data/vendor/gitlab.com/libtiff/libtiff/m4/ltoptions.m4 +437 -0
- data/vendor/gitlab.com/libtiff/libtiff/m4/ltsugar.m4 +124 -0
- data/vendor/gitlab.com/libtiff/libtiff/m4/ltversion.m4 +23 -0
- data/vendor/gitlab.com/libtiff/libtiff/m4/lt~obsolete.m4 +99 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/.cvsignore +3 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/CMakeLists.txt +97 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/Makefile.am +94 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/Makefile.in +684 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFClose.3tiff +53 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFDataWidth.3tiff +74 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFError.3tiff +69 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldDataType.3tiff +53 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldName.3tiff +52 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldPassCount.3tiff +73 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldReadCount.3tiff +77 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldTag.3tiff +56 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFieldWriteCount.3tiff +88 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFFlush.3tiff +64 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFGetField.3tiff +229 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFOpen.3tiff +279 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFPrintDirectory.3tiff +70 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFRGBAImage.3tiff +286 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadDirectory.3tiff +164 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadEncodedStrip.3tiff +78 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadEncodedTile.3tiff +76 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRGBAImage.3tiff +218 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRGBAStrip.3tiff +170 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRGBATile.3tiff +171 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRawStrip.3tiff +64 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadRawTile.3tiff +65 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadScanline.3tiff +94 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFReadTile.3tiff +84 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFSetDirectory.3tiff +79 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFSetField.3tiff +217 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWarning.3tiff +70 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteDirectory.3tiff +138 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteEncodedStrip.3tiff +102 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteEncodedTile.3tiff +96 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteRawStrip.3tiff +96 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteRawTile.3tiff +84 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteScanline.3tiff +154 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFWriteTile.3tiff +77 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFbuffer.3tiff +77 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFcodec.3tiff +82 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFcolor.3tiff +268 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFmemory.3tiff +90 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFquery.3tiff +142 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFsize.3tiff +59 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFstrip.3tiff +99 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFswab.3tiff +80 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/TIFFtile.3tiff +131 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/fax2ps.1 +159 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/fax2tiff.1 +286 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/libtiff.3tiff +545 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/pal2rgb.1 +111 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/ppm2tiff.1 +105 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/raw2tiff.1 +196 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/rgb2ycbcr.1 +99 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/thumbnail.1 +90 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiff2bw.1 +94 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiff2pdf.1 +254 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiff2ps.1 +294 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiff2rgba.1 +97 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffcmp.1 +87 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffcp.1 +317 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffcrop.1 +571 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffdither.1 +135 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffdump.1 +81 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffgt.1 +245 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffinfo.1 +88 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffmedian.1 +112 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffset.1 +99 -0
- data/vendor/gitlab.com/libtiff/libtiff/man/tiffsplit.1 +69 -0
- data/vendor/gitlab.com/libtiff/libtiff/nmake.opt +229 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/.cvsignore +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/CMakeLists.txt +60 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/Makefile.am +35 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/Makefile.in +656 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/Makefile.vc +44 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/dummy.c +12 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/getopt.c +125 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/lfind.c +62 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/libport.h +60 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/snprintf.c +38 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/strcasecmp.c +51 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/strtoul.c +109 -0
- data/vendor/gitlab.com/libtiff/libtiff/port/strtoull.c +116 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/.cvsignore +12 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/CMakeLists.txt +382 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/Makefile.am +334 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/Makefile.in +1987 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/TiffSplitTest.cmake +34 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/TiffTest.cmake +63 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/TiffTestCommon.cmake +108 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/ascii_tag.c +177 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/check_tag.c +91 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/common.sh +122 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/custom_dir.c +247 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/README.txt +29 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/logluv-3c-16b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-1c-16b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-1c-8b.pgm +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-1c-8b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/minisblack-2c-8b-alpha.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/miniswhite-1c-1b.pbm +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/miniswhite-1c-1b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/palette-1c-1b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/palette-1c-4b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/palette-1c-8b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/quad-lzw-compat.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/quad-tile.jpg.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/rgb-3c-16b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/rgb-3c-8b.ppm +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/images/rgb-3c-8b.tiff +0 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/long_tag.c +156 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/ppm2tiff_pbm.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/ppm2tiff_pgm.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/ppm2tiff_ppm.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/raw_decode.c +304 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/rewrite_tag.c +344 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/short_tag.c +205 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/strip.c +290 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/strip_rw.c +157 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/test_arrays.c +829 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/test_arrays.h +63 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2bw-palette-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2bw-quad-lzw-compat.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2bw-rgb-3c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2pdf.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-EPS1.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-PS1.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-PS2.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2ps-PS3.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-logluv-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-minisblack-1c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-minisblack-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-miniswhite-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-palette-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-palette-1c-4b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-palette-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-quad-tile.jpg.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-rgb-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiff2rgba-rgb-3c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-1d-fill.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-1d.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-2d-fill.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3-2d.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g3.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-g4.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-logluv.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-lzw-compat.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-split-join.sh +16 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-split.sh +13 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcp-thumbnail.sh +10 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-logluv-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-minisblack-1c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-minisblack-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-miniswhite-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-palette-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-palette-1c-4b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-palette-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-quad-tile.jpg.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-rgb-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-R90-rgb-3c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-palette-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-palette-1c-4b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-palette-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-quad-tile.jpg.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-logluv-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-minisblack-1c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-minisblack-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-miniswhite-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-palette-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-palette-1c-4b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-palette-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-quad-tile.jpg.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-rgb-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extract-rgb-3c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-logluv-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-palette-1c-1b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-palette-1c-4b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-palette-1c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-quad-tile.jpg.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-rgb-3c-16b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffcrop-extractz14-rgb-3c-8b.sh +7 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffdump.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tiffinfo.sh +6 -0
- data/vendor/gitlab.com/libtiff/libtiff/test/tifftest.h +42 -0
- data/vendor/gitlab.com/libtiff/libtiff/tiff.spec +68 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/.cvsignore +27 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/CMakeLists.txt +125 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.am +138 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.in +955 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.lcc +133 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/Makefile.vc +52 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/fax2ps.c +463 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/fax2tiff.c +491 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/pal2rgb.c +438 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/ppm2tiff.c +397 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/raw2tiff.c +690 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/rgb2ycbcr.c +397 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/thumbnail.c +691 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2bw.c +501 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2pdf.c +5594 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2ps.c +3106 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiff2rgba.c +569 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffcmp.c +659 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffcp.c +1913 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffcrop.c +9231 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffdither.c +347 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffdump.c +889 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffgt.c +486 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffinfo.c +488 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffinfoce.c +472 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffmedian.c +918 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffset.c +356 -0
- data/vendor/gitlab.com/libtiff/libtiff/tools/tiffsplit.c +305 -0
- metadata +692 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# If libtiff.a is installed in /usr/lib or /usr/local/lib just point
|
3
|
+
# LIBTIFF_DIR there. It doesn't need a full libtiff tree.
|
4
|
+
#
|
5
|
+
!INCLUDE ..\..\nmake.opt
|
6
|
+
|
7
|
+
LIBTIFF_DIR = ..\..\libtiff
|
8
|
+
#
|
9
|
+
INCL = -I..\..\libtiff
|
10
|
+
LIBS = $(LIBTIFF_DIR)\libtiff.lib
|
11
|
+
|
12
|
+
addtiffo: addtiffo.obj tif_overview.obj tif_ovrcache.obj
|
13
|
+
$(CC) $(CFLAGS) addtiffo.obj tif_overview.obj tif_ovrcache.obj \
|
14
|
+
$(LIBS) /Feaddtiffo.exe
|
15
|
+
|
16
|
+
|
17
|
+
addtiffo.obj: addtiffo.c
|
18
|
+
$(CC) -c $(CFLAGS) addtiffo.c
|
19
|
+
|
20
|
+
tif_overview.obj: tif_overview.c
|
21
|
+
$(CC) -c $(CFLAGS) tif_overview.c
|
22
|
+
|
23
|
+
tif_ovrcache.obj: tif_ovrcache.c
|
24
|
+
$(CC) -c $(CFLAGS) tif_ovrcache.c
|
25
|
+
|
26
|
+
clean:
|
27
|
+
-del *.obj
|
28
|
+
-del addtiffo.exe
|
@@ -0,0 +1,142 @@
|
|
1
|
+
addtiffo 1.0
|
2
|
+
============
|
3
|
+
|
4
|
+
The addtiffo utility is used to add overview pyramids to an existing
|
5
|
+
TIFF or GeoTIFF file. Some applications can take advantage of these
|
6
|
+
overviews to accelerate overview display performance of large rasters.
|
7
|
+
|
8
|
+
This release of addtiffo is primarily intended for compatibility testing
|
9
|
+
with applications, and to see if there is interest in a cleaner release
|
10
|
+
of the capability ... perhaps incorporation into the libtiff tools
|
11
|
+
distribution.
|
12
|
+
|
13
|
+
Please feel free to contact me with questions, or problems.
|
14
|
+
|
15
|
+
warmerda@home.com
|
16
|
+
http://home.gdal.org/~warmerda/
|
17
|
+
|
18
|
+
|
19
|
+
Usage
|
20
|
+
-----
|
21
|
+
|
22
|
+
Usage: addtiffo [-r {average/nearest} [-subifd]
|
23
|
+
tiff_filename [resolution_reductions]
|
24
|
+
|
25
|
+
Example:
|
26
|
+
% addtiffo abc.tif 2 4 8 16
|
27
|
+
|
28
|
+
The numeric arguments are the list of reduction factors to
|
29
|
+
generate. In this example a 1/2, 1/4 1/8 and 1/16
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
Limitations
|
34
|
+
-----------
|
35
|
+
|
36
|
+
See tif_overview.cpp for up to date details.
|
37
|
+
|
38
|
+
o Currently only images with bits_per_sample of a multiple of eight
|
39
|
+
will work.
|
40
|
+
|
41
|
+
o The code will attempt to use the same kind of compression,
|
42
|
+
photometric interpretation, and organization as the source image, but
|
43
|
+
it doesn't copy geotiff tags to the reduced resolution images.
|
44
|
+
|
45
|
+
o Reduced resolution overviews for multi-sample files will currently
|
46
|
+
always be generated as PLANARCONFIG_SEPARATE. This could be fixed
|
47
|
+
reasonable easily if needed to improve compatibility with other
|
48
|
+
packages. Many don't properly support PLANARCONFIG_SEPARATE.
|
49
|
+
|
50
|
+
o Overviews are always written as appended IFDs, rather than using the
|
51
|
+
``tree of tree's'' approach using the SUBIFD tag. I wanted to implement
|
52
|
+
both, but it isn't currently easy to add a SUBIFD tag to an existing
|
53
|
+
main tiff IFD with libtiff. I hope to try this again later.
|
54
|
+
|
55
|
+
|
56
|
+
TIFF File Tags
|
57
|
+
--------------
|
58
|
+
|
59
|
+
The results of running addtiffo on a 1024x1024 tiled greyscale file
|
60
|
+
with the arguments ``2 4 8 16'' is to add four additional TIFF directories
|
61
|
+
appended on the file with the SUBFILETYPE flag to 0x1 indicating the extra
|
62
|
+
items are reduced resolution images.
|
63
|
+
|
64
|
+
The tiffinfo output of such a file might look like this:
|
65
|
+
|
66
|
+
TIFF Directory at offset 0x118008
|
67
|
+
Image Width: 1024 Image Length: 1024
|
68
|
+
Tile Width: 256 Tile Length: 112
|
69
|
+
Bits/Sample: 8
|
70
|
+
Compression Scheme: none
|
71
|
+
Photometric Interpretation: min-is-black
|
72
|
+
Samples/Pixel: 1
|
73
|
+
Planar Configuration: single image plane
|
74
|
+
TIFF Directory at offset 0x15e1d2
|
75
|
+
Subfile Type: reduced-resolution image (1 = 0x1)
|
76
|
+
Image Width: 512 Image Length: 512
|
77
|
+
Tile Width: 256 Tile Length: 112
|
78
|
+
Bits/Sample: 8
|
79
|
+
Compression Scheme: none
|
80
|
+
Photometric Interpretation: min-is-black
|
81
|
+
Samples/Pixel: 1
|
82
|
+
Planar Configuration: separate image planes
|
83
|
+
TIFF Directory at offset 0x1732b8
|
84
|
+
Subfile Type: reduced-resolution image (1 = 0x1)
|
85
|
+
Image Width: 256 Image Length: 256
|
86
|
+
Tile Width: 256 Tile Length: 112
|
87
|
+
Bits/Sample: 8
|
88
|
+
Compression Scheme: none
|
89
|
+
Photometric Interpretation: min-is-black
|
90
|
+
Samples/Pixel: 1
|
91
|
+
Planar Configuration: separate image planes
|
92
|
+
TIFF Directory at offset 0x17a366
|
93
|
+
Subfile Type: reduced-resolution image (1 = 0x1)
|
94
|
+
Image Width: 128 Image Length: 128
|
95
|
+
Tile Width: 128 Tile Length: 112
|
96
|
+
Bits/Sample: 8
|
97
|
+
Compression Scheme: none
|
98
|
+
Photometric Interpretation: min-is-black
|
99
|
+
Samples/Pixel: 1
|
100
|
+
Planar Configuration: separate image planes
|
101
|
+
TIFF Directory at offset 0x17b40c
|
102
|
+
Subfile Type: reduced-resolution image (1 = 0x1)
|
103
|
+
Image Width: 64 Image Length: 64
|
104
|
+
Tile Width: 64 Tile Length: 64
|
105
|
+
Bits/Sample: 8
|
106
|
+
Compression Scheme: none
|
107
|
+
Photometric Interpretation: min-is-black
|
108
|
+
Samples/Pixel: 1
|
109
|
+
Planar Configuration: separate image planes
|
110
|
+
|
111
|
+
|
112
|
+
Building
|
113
|
+
--------
|
114
|
+
|
115
|
+
You will need a C compiler. You will need to have libtiff already
|
116
|
+
built and installed. The provided Makefile should work on most Unix systems.
|
117
|
+
A similar file will be needed for Windows, but is not provided.
|
118
|
+
|
119
|
+
The CFLAGS and LIBS macros in the Makefile will have to be updated to
|
120
|
+
point to the correct location of the libtiff include files, and library.
|
121
|
+
|
122
|
+
|
123
|
+
Credits
|
124
|
+
-------
|
125
|
+
|
126
|
+
o Intergraph Corporation for partially funding the work.
|
127
|
+
|
128
|
+
o Global Geomatics for partially funding reorganization of the overview
|
129
|
+
building ability as a separate utility.
|
130
|
+
|
131
|
+
o Orrin Long, and Ed Grissom of Intergraph for explaining what needed to
|
132
|
+
be done.
|
133
|
+
|
134
|
+
o Max Martinez of Erdas for his discussion of external overviews.
|
135
|
+
|
136
|
+
o Atlantis Scientific who supported adding averaging, and some other
|
137
|
+
generalizations.
|
138
|
+
|
139
|
+
o Frank Warmerdam for writing the bulk of the code.
|
140
|
+
|
141
|
+
o Sam Leffler since this only exists because of his libtiff.
|
142
|
+
|
@@ -0,0 +1,181 @@
|
|
1
|
+
/******************************************************************************
|
2
|
+
* $Id: addtiffo.c,v 1.8 2015-05-30 20:30:27 bfriesen Exp $
|
3
|
+
*
|
4
|
+
* Project: GeoTIFF Overview Builder
|
5
|
+
* Purpose: Mainline for building overviews in a TIFF file.
|
6
|
+
* Author: Frank Warmerdam, warmerdam@pobox.com
|
7
|
+
*
|
8
|
+
******************************************************************************
|
9
|
+
* Copyright (c) 1999, Frank Warmerdam
|
10
|
+
*
|
11
|
+
* Permission is hereby granted, free of charge, to any person obtaining a
|
12
|
+
* copy of this software and associated documentation files (the "Software"),
|
13
|
+
* to deal in the Software without restriction, including without limitation
|
14
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
15
|
+
* and/or sell copies of the Software, and to permit persons to whom the
|
16
|
+
* Software is furnished to do so, subject to the following conditions:
|
17
|
+
*
|
18
|
+
* The above copyright notice and this permission notice shall be included
|
19
|
+
* in all copies or substantial portions of the Software.
|
20
|
+
*
|
21
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
22
|
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
24
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
27
|
+
* DEALINGS IN THE SOFTWARE.
|
28
|
+
******************************************************************************
|
29
|
+
*
|
30
|
+
* $Log: addtiffo.c,v $
|
31
|
+
* Revision 1.8 2015-05-30 20:30:27 bfriesen
|
32
|
+
* * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity
|
33
|
+
* 1024226 "Untrusted value as argument".
|
34
|
+
*
|
35
|
+
* Revision 1.7 2010-06-08 18:55:15 bfriesen
|
36
|
+
* * contrib: Add an emacs formatting mode footer to all source files
|
37
|
+
* so that emacs can be effectively used.
|
38
|
+
*
|
39
|
+
* Revision 1.6 2005/12/16 05:59:55 fwarmerdam
|
40
|
+
* Major upgrade to support YCbCr subsampled jpeg images
|
41
|
+
*
|
42
|
+
* Revision 1.4 2004/09/21 13:31:23 dron
|
43
|
+
* Add missed include string.h.
|
44
|
+
*
|
45
|
+
* Revision 1.3 2000/04/18 22:48:31 warmerda
|
46
|
+
* Added support for averaging resampling
|
47
|
+
*
|
48
|
+
* Revision 1.2 2000/01/28 15:36:38 warmerda
|
49
|
+
* pass TIFF handle instead of filename to overview builder
|
50
|
+
*
|
51
|
+
* Revision 1.1 1999/08/17 01:47:59 warmerda
|
52
|
+
* New
|
53
|
+
*
|
54
|
+
* Revision 1.1 1999/03/12 17:46:32 warmerda
|
55
|
+
* New
|
56
|
+
*
|
57
|
+
* Revision 1.2 1999/02/11 22:27:12 warmerda
|
58
|
+
* Added multi-sample support
|
59
|
+
*
|
60
|
+
* Revision 1.1 1999/02/11 18:12:30 warmerda
|
61
|
+
* New
|
62
|
+
*/
|
63
|
+
|
64
|
+
#include <stdio.h>
|
65
|
+
#include <stdlib.h>
|
66
|
+
#include <string.h>
|
67
|
+
#include "tiffio.h"
|
68
|
+
|
69
|
+
void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
|
70
|
+
int (*)(double,void*), void * );
|
71
|
+
|
72
|
+
/************************************************************************/
|
73
|
+
/* main() */
|
74
|
+
/************************************************************************/
|
75
|
+
|
76
|
+
int main( int argc, char ** argv )
|
77
|
+
|
78
|
+
{
|
79
|
+
int anOverviews[100]; /* TODO: un-hardwire array length, flexible allocate */
|
80
|
+
int nOverviewCount = 0;
|
81
|
+
int bUseSubIFD = 0;
|
82
|
+
TIFF *hTIFF;
|
83
|
+
const char *pszResampling = "nearest";
|
84
|
+
|
85
|
+
/* -------------------------------------------------------------------- */
|
86
|
+
/* Usage: */
|
87
|
+
/* -------------------------------------------------------------------- */
|
88
|
+
if( argc < 2 )
|
89
|
+
{
|
90
|
+
printf( "Usage: addtiffo [-r {nearest,average,mode}]\n"
|
91
|
+
" tiff_filename [resolution_reductions]\n"
|
92
|
+
"\n"
|
93
|
+
"Example:\n"
|
94
|
+
" %% addtiffo abc.tif 2 4 8 16\n" );
|
95
|
+
return( 1 );
|
96
|
+
}
|
97
|
+
|
98
|
+
while( argv[1][0] == '-' )
|
99
|
+
{
|
100
|
+
if( strcmp(argv[1],"-subifd") == 0 )
|
101
|
+
{
|
102
|
+
bUseSubIFD = 1;
|
103
|
+
argv++;
|
104
|
+
argc--;
|
105
|
+
}
|
106
|
+
else if( strcmp(argv[1],"-r") == 0 )
|
107
|
+
{
|
108
|
+
argv += 2;
|
109
|
+
argc -= 2;
|
110
|
+
pszResampling = *argv;
|
111
|
+
}
|
112
|
+
else
|
113
|
+
{
|
114
|
+
fprintf( stderr, "Incorrect parameters\n" );
|
115
|
+
return( 1 );
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
/* TODO: resampling mode parameter needs to be encoded in an integer from this point on */
|
120
|
+
|
121
|
+
/* -------------------------------------------------------------------- */
|
122
|
+
/* Collect the user requested reduction factors. */
|
123
|
+
/* -------------------------------------------------------------------- */
|
124
|
+
while( nOverviewCount < argc - 2 && nOverviewCount < 100 )
|
125
|
+
{
|
126
|
+
anOverviews[nOverviewCount] = atoi(argv[nOverviewCount+2]);
|
127
|
+
if( (anOverviews[nOverviewCount] <= 0) ||
|
128
|
+
((anOverviews[nOverviewCount] > 1024)))
|
129
|
+
{
|
130
|
+
fprintf( stderr, "Incorrect parameters\n" );
|
131
|
+
return(1);
|
132
|
+
}
|
133
|
+
nOverviewCount++;
|
134
|
+
}
|
135
|
+
|
136
|
+
/* -------------------------------------------------------------------- */
|
137
|
+
/* Default to four overview levels. It would be nicer if it */
|
138
|
+
/* defaulted based on the size of the source image. */
|
139
|
+
/* -------------------------------------------------------------------- */
|
140
|
+
/* TODO: make it default based on the size of the source image */
|
141
|
+
if( nOverviewCount == 0 )
|
142
|
+
{
|
143
|
+
nOverviewCount = 4;
|
144
|
+
|
145
|
+
anOverviews[0] = 2;
|
146
|
+
anOverviews[1] = 4;
|
147
|
+
anOverviews[2] = 8;
|
148
|
+
anOverviews[3] = 16;
|
149
|
+
}
|
150
|
+
|
151
|
+
/* -------------------------------------------------------------------- */
|
152
|
+
/* Build the overview. */
|
153
|
+
/* -------------------------------------------------------------------- */
|
154
|
+
hTIFF = TIFFOpen( argv[1], "r+" );
|
155
|
+
if( hTIFF == NULL )
|
156
|
+
{
|
157
|
+
fprintf( stderr, "TIFFOpen(%s) failed.\n", argv[1] );
|
158
|
+
return( 1 );
|
159
|
+
}
|
160
|
+
|
161
|
+
TIFFBuildOverviews( hTIFF, nOverviewCount, anOverviews, bUseSubIFD,
|
162
|
+
pszResampling, NULL, NULL );
|
163
|
+
|
164
|
+
TIFFClose( hTIFF );
|
165
|
+
|
166
|
+
/* -------------------------------------------------------------------- */
|
167
|
+
/* Optionally test for memory leaks. */
|
168
|
+
/* -------------------------------------------------------------------- */
|
169
|
+
#ifdef DBMALLOC
|
170
|
+
malloc_dump(1);
|
171
|
+
#endif
|
172
|
+
|
173
|
+
return( 0 );
|
174
|
+
}
|
175
|
+
/*
|
176
|
+
* Local Variables:
|
177
|
+
* mode: c
|
178
|
+
* c-basic-offset: 4
|
179
|
+
* fill-column: 78
|
180
|
+
* End:
|
181
|
+
*/
|
@@ -0,0 +1,916 @@
|
|
1
|
+
/******************************************************************************
|
2
|
+
* tif_overview.c,v 1.9 2005/05/25 09:03:16 dron Exp
|
3
|
+
*
|
4
|
+
* Project: TIFF Overview Builder
|
5
|
+
* Purpose: Library function for building overviews in a TIFF file.
|
6
|
+
* Author: Frank Warmerdam, warmerdam@pobox.com
|
7
|
+
*
|
8
|
+
* Notes:
|
9
|
+
* o Currently only images with bits_per_sample of a multiple of eight
|
10
|
+
* will work.
|
11
|
+
*
|
12
|
+
* o The downsampler currently just takes the top left pixel from the
|
13
|
+
* source rectangle. Eventually sampling options of averaging, mode, and
|
14
|
+
* ``center pixel'' should be offered.
|
15
|
+
*
|
16
|
+
* o The code will attempt to use the same kind of compression,
|
17
|
+
* photometric interpretation, and organization as the source image, but
|
18
|
+
* it doesn't copy geotiff tags to the reduced resolution images.
|
19
|
+
*
|
20
|
+
* o Reduced resolution overviews for multi-sample files will currently
|
21
|
+
* always be generated as PLANARCONFIG_SEPARATE. This could be fixed
|
22
|
+
* reasonable easily if needed to improve compatibility with other
|
23
|
+
* packages. Many don't properly support PLANARCONFIG_SEPARATE.
|
24
|
+
*
|
25
|
+
******************************************************************************
|
26
|
+
* Copyright (c) 1999, Frank Warmerdam
|
27
|
+
*
|
28
|
+
* Permission is hereby granted, free of charge, to any person obtaining a
|
29
|
+
* copy of this software and associated documentation files (the "Software"),
|
30
|
+
* to deal in the Software without restriction, including without limitation
|
31
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
32
|
+
* and/or sell copies of the Software, and to permit persons to whom the
|
33
|
+
* Software is furnished to do so, subject to the following conditions:
|
34
|
+
*
|
35
|
+
* The above copyright notice and this permission notice shall be included
|
36
|
+
* in all copies or substantial portions of the Software.
|
37
|
+
*
|
38
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
39
|
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
40
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
41
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
42
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
43
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
44
|
+
* DEALINGS IN THE SOFTWARE.
|
45
|
+
******************************************************************************
|
46
|
+
*/
|
47
|
+
|
48
|
+
/* TODO: update notes in header above */
|
49
|
+
|
50
|
+
#include <stdio.h>
|
51
|
+
#include <assert.h>
|
52
|
+
#include <stdlib.h>
|
53
|
+
#include <string.h>
|
54
|
+
|
55
|
+
#include "tiffio.h"
|
56
|
+
#include "tif_ovrcache.h"
|
57
|
+
|
58
|
+
#ifndef FALSE
|
59
|
+
# define FALSE 0
|
60
|
+
# define TRUE 1
|
61
|
+
#endif
|
62
|
+
|
63
|
+
#ifndef MAX
|
64
|
+
# define MIN(a,b) ((a<b) ? a : b)
|
65
|
+
# define MAX(a,b) ((a>b) ? a : b)
|
66
|
+
#endif
|
67
|
+
|
68
|
+
void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
|
69
|
+
int (*)(double,void*), void * );
|
70
|
+
|
71
|
+
/************************************************************************/
|
72
|
+
/* TIFF_WriteOverview() */
|
73
|
+
/* */
|
74
|
+
/* Create a new directory, without any image data for an overview. */
|
75
|
+
/* Returns offset of newly created overview directory, but the */
|
76
|
+
/* current directory is reset to be the one in used when this */
|
77
|
+
/* function is called. */
|
78
|
+
/************************************************************************/
|
79
|
+
|
80
|
+
uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize,
|
81
|
+
int nBitsPerPixel, int nPlanarConfig, int nSamples,
|
82
|
+
int nBlockXSize, int nBlockYSize,
|
83
|
+
int bTiled, int nCompressFlag, int nPhotometric,
|
84
|
+
int nSampleFormat,
|
85
|
+
unsigned short *panRed,
|
86
|
+
unsigned short *panGreen,
|
87
|
+
unsigned short *panBlue,
|
88
|
+
int bUseSubIFDs,
|
89
|
+
int nHorSubsampling, int nVerSubsampling )
|
90
|
+
|
91
|
+
{
|
92
|
+
toff_t nBaseDirOffset;
|
93
|
+
toff_t nOffset;
|
94
|
+
|
95
|
+
(void) bUseSubIFDs;
|
96
|
+
|
97
|
+
nBaseDirOffset = TIFFCurrentDirOffset( hTIFF );
|
98
|
+
|
99
|
+
TIFFCreateDirectory( hTIFF );
|
100
|
+
|
101
|
+
/* -------------------------------------------------------------------- */
|
102
|
+
/* Setup TIFF fields. */
|
103
|
+
/* -------------------------------------------------------------------- */
|
104
|
+
TIFFSetField( hTIFF, TIFFTAG_IMAGEWIDTH, nXSize );
|
105
|
+
TIFFSetField( hTIFF, TIFFTAG_IMAGELENGTH, nYSize );
|
106
|
+
if( nSamples == 1 )
|
107
|
+
TIFFSetField( hTIFF, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG );
|
108
|
+
else
|
109
|
+
TIFFSetField( hTIFF, TIFFTAG_PLANARCONFIG, nPlanarConfig );
|
110
|
+
|
111
|
+
TIFFSetField( hTIFF, TIFFTAG_BITSPERSAMPLE, nBitsPerPixel );
|
112
|
+
TIFFSetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, nSamples );
|
113
|
+
TIFFSetField( hTIFF, TIFFTAG_COMPRESSION, nCompressFlag );
|
114
|
+
TIFFSetField( hTIFF, TIFFTAG_PHOTOMETRIC, nPhotometric );
|
115
|
+
TIFFSetField( hTIFF, TIFFTAG_SAMPLEFORMAT, nSampleFormat );
|
116
|
+
|
117
|
+
if( bTiled )
|
118
|
+
{
|
119
|
+
TIFFSetField( hTIFF, TIFFTAG_TILEWIDTH, nBlockXSize );
|
120
|
+
TIFFSetField( hTIFF, TIFFTAG_TILELENGTH, nBlockYSize );
|
121
|
+
}
|
122
|
+
else
|
123
|
+
TIFFSetField( hTIFF, TIFFTAG_ROWSPERSTRIP, nBlockYSize );
|
124
|
+
|
125
|
+
TIFFSetField( hTIFF, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE );
|
126
|
+
|
127
|
+
if( nPhotometric == PHOTOMETRIC_YCBCR || nPhotometric == PHOTOMETRIC_ITULAB )
|
128
|
+
{
|
129
|
+
TIFFSetField( hTIFF, TIFFTAG_YCBCRSUBSAMPLING, nHorSubsampling, nVerSubsampling);
|
130
|
+
/* TODO: also write YCbCrPositioning and YCbCrCoefficients tag identical to source IFD */
|
131
|
+
}
|
132
|
+
/* TODO: add command-line parameter for selecting jpeg compression quality
|
133
|
+
* that gets ignored when compression isn't jpeg */
|
134
|
+
|
135
|
+
/* -------------------------------------------------------------------- */
|
136
|
+
/* Write color table if one is present. */
|
137
|
+
/* -------------------------------------------------------------------- */
|
138
|
+
if( panRed != NULL )
|
139
|
+
{
|
140
|
+
TIFFSetField( hTIFF, TIFFTAG_COLORMAP, panRed, panGreen, panBlue );
|
141
|
+
}
|
142
|
+
|
143
|
+
/* -------------------------------------------------------------------- */
|
144
|
+
/* Write directory, and return byte offset. */
|
145
|
+
/* -------------------------------------------------------------------- */
|
146
|
+
if( TIFFWriteCheck( hTIFF, bTiled, "TIFFBuildOverviews" ) == 0 )
|
147
|
+
return 0;
|
148
|
+
|
149
|
+
TIFFWriteDirectory( hTIFF );
|
150
|
+
TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) );
|
151
|
+
|
152
|
+
nOffset = TIFFCurrentDirOffset( hTIFF );
|
153
|
+
|
154
|
+
TIFFSetSubDirectory( hTIFF, nBaseDirOffset );
|
155
|
+
|
156
|
+
return nOffset;
|
157
|
+
}
|
158
|
+
|
159
|
+
/************************************************************************/
|
160
|
+
/* TIFF_GetSourceSamples() */
|
161
|
+
/************************************************************************/
|
162
|
+
|
163
|
+
static void
|
164
|
+
TIFF_GetSourceSamples( double * padfSamples, unsigned char *pabySrc,
|
165
|
+
int nPixelBytes, int nSampleFormat,
|
166
|
+
uint32 nXSize, uint32 nYSize,
|
167
|
+
int nPixelOffset, int nLineOffset )
|
168
|
+
{
|
169
|
+
uint32 iXOff, iYOff;
|
170
|
+
int iSample;
|
171
|
+
|
172
|
+
iSample = 0;
|
173
|
+
|
174
|
+
for( iYOff = 0; iYOff < nYSize; iYOff++ )
|
175
|
+
{
|
176
|
+
for( iXOff = 0; iXOff < nXSize; iXOff++ )
|
177
|
+
{
|
178
|
+
unsigned char *pabyData;
|
179
|
+
|
180
|
+
pabyData = pabySrc + iYOff * nLineOffset + iXOff * nPixelOffset;
|
181
|
+
|
182
|
+
if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1 )
|
183
|
+
{
|
184
|
+
padfSamples[iSample++] = *pabyData;
|
185
|
+
}
|
186
|
+
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2 )
|
187
|
+
{
|
188
|
+
padfSamples[iSample++] = ((uint16 *) pabyData)[0];
|
189
|
+
}
|
190
|
+
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4 )
|
191
|
+
{
|
192
|
+
padfSamples[iSample++] = ((uint32 *) pabyData)[0];
|
193
|
+
}
|
194
|
+
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2 )
|
195
|
+
{
|
196
|
+
padfSamples[iSample++] = ((int16 *) pabyData)[0];
|
197
|
+
}
|
198
|
+
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32 )
|
199
|
+
{
|
200
|
+
padfSamples[iSample++] = ((int32 *) pabyData)[0];
|
201
|
+
}
|
202
|
+
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4 )
|
203
|
+
{
|
204
|
+
padfSamples[iSample++] = ((float *) pabyData)[0];
|
205
|
+
}
|
206
|
+
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8 )
|
207
|
+
{
|
208
|
+
padfSamples[iSample++] = ((double *) pabyData)[0];
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
/************************************************************************/
|
215
|
+
/* TIFF_SetSample() */
|
216
|
+
/************************************************************************/
|
217
|
+
|
218
|
+
static void
|
219
|
+
TIFF_SetSample( unsigned char * pabyData, int nPixelBytes, int nSampleFormat,
|
220
|
+
double dfValue )
|
221
|
+
|
222
|
+
{
|
223
|
+
if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1 )
|
224
|
+
{
|
225
|
+
*pabyData = (unsigned char) MAX(0,MIN(255,dfValue));
|
226
|
+
}
|
227
|
+
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2 )
|
228
|
+
{
|
229
|
+
*((uint16 *)pabyData) = (uint16) MAX(0,MIN(65535,dfValue));
|
230
|
+
}
|
231
|
+
else if( nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4 )
|
232
|
+
{
|
233
|
+
*((uint32 *)pabyData) = (uint32) dfValue;
|
234
|
+
}
|
235
|
+
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2 )
|
236
|
+
{
|
237
|
+
*((int16 *)pabyData) = (int16) MAX(-32768,MIN(32767,dfValue));
|
238
|
+
}
|
239
|
+
else if( nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32 )
|
240
|
+
{
|
241
|
+
*((int32 *)pabyData) = (int32) dfValue;
|
242
|
+
}
|
243
|
+
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4 )
|
244
|
+
{
|
245
|
+
*((float *)pabyData) = (float) dfValue;
|
246
|
+
}
|
247
|
+
else if( nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8 )
|
248
|
+
{
|
249
|
+
*((double *)pabyData) = dfValue;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
|
253
|
+
/************************************************************************/
|
254
|
+
/* TIFF_DownSample() */
|
255
|
+
/* */
|
256
|
+
/* Down sample a tile of full res data into a window of a tile */
|
257
|
+
/* of downsampled data. */
|
258
|
+
/************************************************************************/
|
259
|
+
|
260
|
+
static
|
261
|
+
void TIFF_DownSample( unsigned char *pabySrcTile,
|
262
|
+
uint32 nBlockXSize, uint32 nBlockYSize,
|
263
|
+
int nPixelSkewBits, int nBitsPerPixel,
|
264
|
+
unsigned char * pabyOTile,
|
265
|
+
uint32 nOBlockXSize, uint32 nOBlockYSize,
|
266
|
+
uint32 nTXOff, uint32 nTYOff, int nOMult,
|
267
|
+
int nSampleFormat, const char * pszResampling )
|
268
|
+
|
269
|
+
{
|
270
|
+
uint32 i, j;
|
271
|
+
int k, nPixelBytes = (nBitsPerPixel) / 8;
|
272
|
+
int nPixelGroupBytes = (nBitsPerPixel+nPixelSkewBits)/8;
|
273
|
+
unsigned char *pabySrc, *pabyDst;
|
274
|
+
double *padfSamples;
|
275
|
+
size_t tpadfSamples_size, padfSamples_size;
|
276
|
+
|
277
|
+
assert( nBitsPerPixel >= 8 );
|
278
|
+
|
279
|
+
/* sizeof(double) * nOMult * nOMult */
|
280
|
+
tpadfSamples_size=nOMult*nOMult;
|
281
|
+
if ((nOMult != 0) && (tpadfSamples_size/nOMult == (size_t) nOMult)) {
|
282
|
+
padfSamples_size=tpadfSamples_size;
|
283
|
+
tpadfSamples_size=padfSamples_size*sizeof(double);
|
284
|
+
if ((tpadfSamples_size / padfSamples_size) == sizeof(double))
|
285
|
+
padfSamples_size=tpadfSamples_size;
|
286
|
+
else
|
287
|
+
padfSamples_size=0;
|
288
|
+
} else {
|
289
|
+
padfSamples_size=0;
|
290
|
+
}
|
291
|
+
if (padfSamples_size == 0) {
|
292
|
+
/* TODO: This is an error condition */
|
293
|
+
return;
|
294
|
+
}
|
295
|
+
padfSamples = (double *) malloc(padfSamples_size);
|
296
|
+
|
297
|
+
/* ==================================================================== */
|
298
|
+
/* Loop over scanline chunks to process, establishing where the */
|
299
|
+
/* data is going. */
|
300
|
+
/* ==================================================================== */
|
301
|
+
for( j = 0; j*nOMult < nBlockYSize; j++ )
|
302
|
+
{
|
303
|
+
if( j + nTYOff >= nOBlockYSize )
|
304
|
+
break;
|
305
|
+
|
306
|
+
pabyDst = pabyOTile + ((j+nTYOff)*nOBlockXSize + nTXOff)
|
307
|
+
* nPixelBytes * nPixelGroupBytes;
|
308
|
+
|
309
|
+
/* -------------------------------------------------------------------- */
|
310
|
+
/* Handler nearest resampling ... we don't even care about the */
|
311
|
+
/* data type, we just do a bytewise copy. */
|
312
|
+
/* -------------------------------------------------------------------- */
|
313
|
+
if( strncmp(pszResampling,"nearest",4) == 0
|
314
|
+
|| strncmp(pszResampling,"NEAR",4) == 0 )
|
315
|
+
{
|
316
|
+
pabySrc = pabySrcTile + j*nOMult*nBlockXSize * nPixelGroupBytes;
|
317
|
+
|
318
|
+
for( i = 0; i*nOMult < nBlockXSize; i++ )
|
319
|
+
{
|
320
|
+
if( i + nTXOff >= nOBlockXSize )
|
321
|
+
break;
|
322
|
+
|
323
|
+
/*
|
324
|
+
* For now use simple subsampling, from the top left corner
|
325
|
+
* of the source block of pixels.
|
326
|
+
*/
|
327
|
+
|
328
|
+
for( k = 0; k < nPixelBytes; k++ )
|
329
|
+
pabyDst[k] = pabySrc[k];
|
330
|
+
|
331
|
+
pabyDst += nPixelBytes * nPixelGroupBytes;
|
332
|
+
pabySrc += nOMult * nPixelGroupBytes;
|
333
|
+
}
|
334
|
+
}
|
335
|
+
|
336
|
+
/* -------------------------------------------------------------------- */
|
337
|
+
/* Handle the case of averaging. For this we also have to */
|
338
|
+
/* handle each sample format we are concerned with. */
|
339
|
+
/* -------------------------------------------------------------------- */
|
340
|
+
else if( strncmp(pszResampling,"averag",6) == 0
|
341
|
+
|| strncmp(pszResampling,"AVERAG",6) == 0 )
|
342
|
+
{
|
343
|
+
pabySrc = pabySrcTile + j*nOMult*nBlockXSize * nPixelGroupBytes;
|
344
|
+
|
345
|
+
for( i = 0; i*nOMult < nBlockXSize; i++ )
|
346
|
+
{
|
347
|
+
double dfTotal;
|
348
|
+
uint32 nXSize, nYSize, iSample;
|
349
|
+
|
350
|
+
if( i + nTXOff >= nOBlockXSize )
|
351
|
+
break;
|
352
|
+
|
353
|
+
nXSize = MIN((uint32)nOMult,nBlockXSize-i);
|
354
|
+
nYSize = MIN((uint32)nOMult,nBlockYSize-j);
|
355
|
+
|
356
|
+
TIFF_GetSourceSamples( padfSamples, pabySrc,
|
357
|
+
nPixelBytes, nSampleFormat,
|
358
|
+
nXSize, nYSize,
|
359
|
+
nPixelGroupBytes,
|
360
|
+
nPixelGroupBytes * nBlockXSize );
|
361
|
+
|
362
|
+
dfTotal = 0;
|
363
|
+
for( iSample = 0; iSample < nXSize*nYSize; iSample++ )
|
364
|
+
{
|
365
|
+
dfTotal += padfSamples[iSample];
|
366
|
+
}
|
367
|
+
|
368
|
+
TIFF_SetSample( pabyDst, nPixelBytes, nSampleFormat,
|
369
|
+
dfTotal / (nXSize*nYSize) );
|
370
|
+
|
371
|
+
pabySrc += nOMult * nPixelGroupBytes;
|
372
|
+
pabyDst += nPixelBytes;
|
373
|
+
}
|
374
|
+
}
|
375
|
+
}
|
376
|
+
|
377
|
+
free( padfSamples );
|
378
|
+
}
|
379
|
+
|
380
|
+
/************************************************************************/
|
381
|
+
/* TIFF_DownSample_Subsampled() */
|
382
|
+
/************************************************************************/
|
383
|
+
static
|
384
|
+
void TIFF_DownSample_Subsampled( unsigned char *pabySrcTile, int nSample,
|
385
|
+
uint32 nBlockXSize, uint32 nBlockYSize,
|
386
|
+
unsigned char * pabyOTile,
|
387
|
+
uint32 nOBlockXSize, uint32 nOBlockYSize,
|
388
|
+
uint32 nTXOff, uint32 nTYOff, int nOMult,
|
389
|
+
const char *pszResampling,
|
390
|
+
int nHorSubsampling, int nVerSubsampling )
|
391
|
+
{
|
392
|
+
/* TODO: test with variety of subsampling values, and incovinient tile/strip sizes */
|
393
|
+
int nSampleBlockSize;
|
394
|
+
int nSourceSampleRowSize;
|
395
|
+
int nDestSampleRowSize;
|
396
|
+
uint32 nSourceX, nSourceY;
|
397
|
+
uint32 nSourceXSec, nSourceYSec;
|
398
|
+
uint32 nSourceXSecEnd, nSourceYSecEnd;
|
399
|
+
uint32 nDestX, nDestY;
|
400
|
+
int nSampleOffsetInSampleBlock;
|
401
|
+
unsigned int nCummulator;
|
402
|
+
unsigned int nCummulatorCount;
|
403
|
+
|
404
|
+
nSampleBlockSize = nHorSubsampling * nVerSubsampling + 2;
|
405
|
+
nSourceSampleRowSize =
|
406
|
+
( ( nBlockXSize + nHorSubsampling - 1 ) / nHorSubsampling ) * nSampleBlockSize;
|
407
|
+
nDestSampleRowSize =
|
408
|
+
( ( nOBlockXSize + nHorSubsampling - 1 ) / nHorSubsampling ) * nSampleBlockSize;
|
409
|
+
|
410
|
+
if( strncmp(pszResampling,"nearest",4) == 0
|
411
|
+
|| strncmp(pszResampling,"NEAR",4) == 0 )
|
412
|
+
{
|
413
|
+
if( nSample == 0 )
|
414
|
+
{
|
415
|
+
for( nSourceY = 0, nDestY = nTYOff;
|
416
|
+
nSourceY < nBlockYSize;
|
417
|
+
nSourceY += nOMult, nDestY ++)
|
418
|
+
{
|
419
|
+
if( nDestY >= nOBlockYSize )
|
420
|
+
break;
|
421
|
+
|
422
|
+
for( nSourceX = 0, nDestX = nTXOff;
|
423
|
+
nSourceX < nBlockXSize;
|
424
|
+
nSourceX += nOMult, nDestX ++)
|
425
|
+
{
|
426
|
+
if( nDestX >= nOBlockXSize )
|
427
|
+
break;
|
428
|
+
|
429
|
+
* ( pabyOTile + ( nDestY / nVerSubsampling ) * nDestSampleRowSize
|
430
|
+
+ ( nDestY % nVerSubsampling ) * nHorSubsampling
|
431
|
+
+ ( nDestX / nHorSubsampling ) * nSampleBlockSize
|
432
|
+
+ ( nDestX % nHorSubsampling ) ) =
|
433
|
+
* ( pabySrcTile + ( nSourceY / nVerSubsampling ) * nSourceSampleRowSize
|
434
|
+
+ ( nSourceY % nVerSubsampling ) * nHorSubsampling
|
435
|
+
+ ( nSourceX / nHorSubsampling ) * nSampleBlockSize
|
436
|
+
+ ( nSourceX % nHorSubsampling ) );
|
437
|
+
}
|
438
|
+
}
|
439
|
+
}
|
440
|
+
else
|
441
|
+
{
|
442
|
+
nSampleOffsetInSampleBlock = nHorSubsampling * nVerSubsampling + nSample - 1;
|
443
|
+
for( nSourceY = 0, nDestY = ( nTYOff / nVerSubsampling );
|
444
|
+
nSourceY < ( nBlockYSize / nVerSubsampling );
|
445
|
+
nSourceY += nOMult, nDestY ++)
|
446
|
+
{
|
447
|
+
if( nDestY*nVerSubsampling >= nOBlockYSize )
|
448
|
+
break;
|
449
|
+
|
450
|
+
for( nSourceX = 0, nDestX = ( nTXOff / nHorSubsampling );
|
451
|
+
nSourceX < ( nBlockXSize / nHorSubsampling );
|
452
|
+
nSourceX += nOMult, nDestX ++)
|
453
|
+
{
|
454
|
+
if( nDestX*nHorSubsampling >= nOBlockXSize )
|
455
|
+
break;
|
456
|
+
|
457
|
+
* ( pabyOTile + nDestY * nDestSampleRowSize
|
458
|
+
+ nDestX * nSampleBlockSize
|
459
|
+
+ nSampleOffsetInSampleBlock ) =
|
460
|
+
* ( pabySrcTile + nSourceY * nSourceSampleRowSize
|
461
|
+
+ nSourceX * nSampleBlockSize
|
462
|
+
+ nSampleOffsetInSampleBlock );
|
463
|
+
}
|
464
|
+
}
|
465
|
+
}
|
466
|
+
}
|
467
|
+
else if( strncmp(pszResampling,"averag",6) == 0
|
468
|
+
|| strncmp(pszResampling,"AVERAG",6) == 0 )
|
469
|
+
{
|
470
|
+
if( nSample == 0 )
|
471
|
+
{
|
472
|
+
for( nSourceY = 0, nDestY = nTYOff; nSourceY < nBlockYSize; nSourceY += nOMult, nDestY ++)
|
473
|
+
{
|
474
|
+
if( nDestY >= nOBlockYSize )
|
475
|
+
break;
|
476
|
+
|
477
|
+
for( nSourceX = 0, nDestX = nTXOff; nSourceX < nBlockXSize; nSourceX += nOMult, nDestX ++)
|
478
|
+
{
|
479
|
+
if( nDestX >= nOBlockXSize )
|
480
|
+
break;
|
481
|
+
|
482
|
+
nSourceXSecEnd = nSourceX + nOMult;
|
483
|
+
if( nSourceXSecEnd > nBlockXSize )
|
484
|
+
nSourceXSecEnd = nBlockXSize;
|
485
|
+
nSourceYSecEnd = nSourceY + nOMult;
|
486
|
+
if( nSourceYSecEnd > nBlockYSize )
|
487
|
+
nSourceYSecEnd = nBlockYSize;
|
488
|
+
nCummulator = 0;
|
489
|
+
for( nSourceYSec = nSourceY; nSourceYSec < nSourceYSecEnd; nSourceYSec ++)
|
490
|
+
{
|
491
|
+
for( nSourceXSec = nSourceX; nSourceXSec < nSourceXSecEnd; nSourceXSec ++)
|
492
|
+
{
|
493
|
+
nCummulator += * ( pabySrcTile + ( nSourceYSec / nVerSubsampling ) * nSourceSampleRowSize
|
494
|
+
+ ( nSourceYSec % nVerSubsampling ) * nHorSubsampling
|
495
|
+
+ ( nSourceXSec / nHorSubsampling ) * nSampleBlockSize
|
496
|
+
+ ( nSourceXSec % nHorSubsampling ) );
|
497
|
+
}
|
498
|
+
}
|
499
|
+
nCummulatorCount = ( nSourceXSecEnd - nSourceX ) * ( nSourceYSecEnd - nSourceY );
|
500
|
+
* ( pabyOTile + ( nDestY / nVerSubsampling ) * nDestSampleRowSize
|
501
|
+
+ ( nDestY % nVerSubsampling ) * nHorSubsampling
|
502
|
+
+ ( nDestX / nHorSubsampling ) * nSampleBlockSize
|
503
|
+
+ ( nDestX % nHorSubsampling ) ) =
|
504
|
+
( ( nCummulator + ( nCummulatorCount >> 1 ) ) / nCummulatorCount );
|
505
|
+
}
|
506
|
+
}
|
507
|
+
}
|
508
|
+
else
|
509
|
+
{
|
510
|
+
nSampleOffsetInSampleBlock = nHorSubsampling * nVerSubsampling + nSample - 1;
|
511
|
+
for( nSourceY = 0, nDestY = ( nTYOff / nVerSubsampling ); nSourceY < ( nBlockYSize / nVerSubsampling );
|
512
|
+
nSourceY += nOMult, nDestY ++)
|
513
|
+
{
|
514
|
+
if( nDestY*nVerSubsampling >= nOBlockYSize )
|
515
|
+
break;
|
516
|
+
|
517
|
+
for( nSourceX = 0, nDestX = ( nTXOff / nHorSubsampling ); nSourceX < ( nBlockXSize / nHorSubsampling );
|
518
|
+
nSourceX += nOMult, nDestX ++)
|
519
|
+
{
|
520
|
+
if( nDestX*nHorSubsampling >= nOBlockXSize )
|
521
|
+
break;
|
522
|
+
|
523
|
+
nSourceXSecEnd = nSourceX + nOMult;
|
524
|
+
if( nSourceXSecEnd > ( nBlockXSize / nHorSubsampling ) )
|
525
|
+
nSourceXSecEnd = ( nBlockXSize / nHorSubsampling );
|
526
|
+
nSourceYSecEnd = nSourceY + nOMult;
|
527
|
+
if( nSourceYSecEnd > ( nBlockYSize / nVerSubsampling ) )
|
528
|
+
nSourceYSecEnd = ( nBlockYSize / nVerSubsampling );
|
529
|
+
nCummulator = 0;
|
530
|
+
for( nSourceYSec = nSourceY; nSourceYSec < nSourceYSecEnd; nSourceYSec ++)
|
531
|
+
{
|
532
|
+
for( nSourceXSec = nSourceX; nSourceXSec < nSourceXSecEnd; nSourceXSec ++)
|
533
|
+
{
|
534
|
+
nCummulator += * ( pabySrcTile + nSourceYSec * nSourceSampleRowSize
|
535
|
+
+ nSourceXSec * nSampleBlockSize
|
536
|
+
+ nSampleOffsetInSampleBlock );
|
537
|
+
}
|
538
|
+
}
|
539
|
+
nCummulatorCount = ( nSourceXSecEnd - nSourceX ) * ( nSourceYSecEnd - nSourceY );
|
540
|
+
* ( pabyOTile + nDestY * nDestSampleRowSize
|
541
|
+
+ nDestX * nSampleBlockSize
|
542
|
+
+ nSampleOffsetInSampleBlock ) =
|
543
|
+
( ( nCummulator + ( nCummulatorCount >> 1 ) ) / nCummulatorCount );
|
544
|
+
}
|
545
|
+
}
|
546
|
+
}
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
/************************************************************************/
|
551
|
+
/* TIFF_ProcessFullResBlock() */
|
552
|
+
/* */
|
553
|
+
/* Process one block of full res data, downsampling into each */
|
554
|
+
/* of the overviews. */
|
555
|
+
/************************************************************************/
|
556
|
+
|
557
|
+
void TIFF_ProcessFullResBlock( TIFF *hTIFF, int nPlanarConfig,
|
558
|
+
int bSubsampled,
|
559
|
+
int nHorSubsampling, int nVerSubsampling,
|
560
|
+
int nOverviews, int * panOvList,
|
561
|
+
int nBitsPerPixel,
|
562
|
+
int nSamples, TIFFOvrCache ** papoRawBIs,
|
563
|
+
uint32 nSXOff, uint32 nSYOff,
|
564
|
+
unsigned char *pabySrcTile,
|
565
|
+
uint32 nBlockXSize, uint32 nBlockYSize,
|
566
|
+
int nSampleFormat, const char * pszResampling )
|
567
|
+
|
568
|
+
{
|
569
|
+
int iOverview, iSample;
|
570
|
+
|
571
|
+
for( iSample = 0; iSample < nSamples; iSample++ )
|
572
|
+
{
|
573
|
+
/*
|
574
|
+
* We have to read a tile/strip for each sample for
|
575
|
+
* PLANARCONFIG_SEPARATE. Otherwise, we just read all the samples
|
576
|
+
* at once when handling the first sample.
|
577
|
+
*/
|
578
|
+
if( nPlanarConfig == PLANARCONFIG_SEPARATE || iSample == 0 )
|
579
|
+
{
|
580
|
+
if( TIFFIsTiled(hTIFF) )
|
581
|
+
{
|
582
|
+
TIFFReadEncodedTile( hTIFF,
|
583
|
+
TIFFComputeTile(hTIFF, nSXOff, nSYOff,
|
584
|
+
0, (tsample_t)iSample ),
|
585
|
+
pabySrcTile,
|
586
|
+
TIFFTileSize(hTIFF));
|
587
|
+
}
|
588
|
+
else
|
589
|
+
{
|
590
|
+
TIFFReadEncodedStrip( hTIFF,
|
591
|
+
TIFFComputeStrip(hTIFF, nSYOff,
|
592
|
+
(tsample_t) iSample),
|
593
|
+
pabySrcTile,
|
594
|
+
TIFFStripSize(hTIFF) );
|
595
|
+
}
|
596
|
+
}
|
597
|
+
|
598
|
+
/*
|
599
|
+
* Loop over destination overview layers
|
600
|
+
*/
|
601
|
+
for( iOverview = 0; iOverview < nOverviews; iOverview++ )
|
602
|
+
{
|
603
|
+
TIFFOvrCache *poRBI = papoRawBIs[iOverview];
|
604
|
+
unsigned char *pabyOTile;
|
605
|
+
uint32 nTXOff, nTYOff, nOXOff, nOYOff, nOMult;
|
606
|
+
uint32 nOBlockXSize = poRBI->nBlockXSize;
|
607
|
+
uint32 nOBlockYSize = poRBI->nBlockYSize;
|
608
|
+
int nSkewBits, nSampleByteOffset;
|
609
|
+
|
610
|
+
/*
|
611
|
+
* Fetch the destination overview tile
|
612
|
+
*/
|
613
|
+
nOMult = panOvList[iOverview];
|
614
|
+
nOXOff = (nSXOff/nOMult) / nOBlockXSize;
|
615
|
+
nOYOff = (nSYOff/nOMult) / nOBlockYSize;
|
616
|
+
|
617
|
+
if( bSubsampled )
|
618
|
+
{
|
619
|
+
pabyOTile = TIFFGetOvrBlock_Subsampled( poRBI, nOXOff, nOYOff );
|
620
|
+
|
621
|
+
/*
|
622
|
+
* Establish the offset into this tile at which we should
|
623
|
+
* start placing data.
|
624
|
+
*/
|
625
|
+
nTXOff = (nSXOff - nOXOff*nOMult*nOBlockXSize) / nOMult;
|
626
|
+
nTYOff = (nSYOff - nOYOff*nOMult*nOBlockYSize) / nOMult;
|
627
|
+
|
628
|
+
|
629
|
+
#ifdef DBMALLOC
|
630
|
+
malloc_chain_check( 1 );
|
631
|
+
#endif
|
632
|
+
TIFF_DownSample_Subsampled( pabySrcTile, iSample,
|
633
|
+
nBlockXSize, nBlockYSize,
|
634
|
+
pabyOTile,
|
635
|
+
poRBI->nBlockXSize, poRBI->nBlockYSize,
|
636
|
+
nTXOff, nTYOff,
|
637
|
+
nOMult, pszResampling,
|
638
|
+
nHorSubsampling, nVerSubsampling );
|
639
|
+
#ifdef DBMALLOC
|
640
|
+
malloc_chain_check( 1 );
|
641
|
+
#endif
|
642
|
+
|
643
|
+
}
|
644
|
+
else
|
645
|
+
{
|
646
|
+
|
647
|
+
pabyOTile = TIFFGetOvrBlock( poRBI, nOXOff, nOYOff, iSample );
|
648
|
+
|
649
|
+
/*
|
650
|
+
* Establish the offset into this tile at which we should
|
651
|
+
* start placing data.
|
652
|
+
*/
|
653
|
+
nTXOff = (nSXOff - nOXOff*nOMult*nOBlockXSize) / nOMult;
|
654
|
+
nTYOff = (nSYOff - nOYOff*nOMult*nOBlockYSize) / nOMult;
|
655
|
+
|
656
|
+
/*
|
657
|
+
* Figure out the skew (extra space between ``our samples'') and
|
658
|
+
* the byte offset to the first sample.
|
659
|
+
*/
|
660
|
+
assert( (nBitsPerPixel % 8) == 0 );
|
661
|
+
if( nPlanarConfig == PLANARCONFIG_SEPARATE )
|
662
|
+
{
|
663
|
+
nSkewBits = 0;
|
664
|
+
nSampleByteOffset = 0;
|
665
|
+
}
|
666
|
+
else
|
667
|
+
{
|
668
|
+
nSkewBits = nBitsPerPixel * (nSamples-1);
|
669
|
+
nSampleByteOffset = (nBitsPerPixel/8) * iSample;
|
670
|
+
}
|
671
|
+
|
672
|
+
/*
|
673
|
+
* Perform the downsampling.
|
674
|
+
*/
|
675
|
+
#ifdef DBMALLOC
|
676
|
+
malloc_chain_check( 1 );
|
677
|
+
#endif
|
678
|
+
TIFF_DownSample( pabySrcTile + nSampleByteOffset,
|
679
|
+
nBlockXSize, nBlockYSize,
|
680
|
+
nSkewBits, nBitsPerPixel, pabyOTile,
|
681
|
+
poRBI->nBlockXSize, poRBI->nBlockYSize,
|
682
|
+
nTXOff, nTYOff,
|
683
|
+
nOMult, nSampleFormat, pszResampling );
|
684
|
+
#ifdef DBMALLOC
|
685
|
+
malloc_chain_check( 1 );
|
686
|
+
#endif
|
687
|
+
}
|
688
|
+
}
|
689
|
+
}
|
690
|
+
}
|
691
|
+
|
692
|
+
/************************************************************************/
|
693
|
+
/* TIFF_BuildOverviews() */
|
694
|
+
/* */
|
695
|
+
/* Build the requested list of overviews. Overviews are */
|
696
|
+
/* maintained in a bunch of temporary files and then these are */
|
697
|
+
/* written back to the TIFF file. Only one pass through the */
|
698
|
+
/* source TIFF file is made for any number of output */
|
699
|
+
/* overviews. */
|
700
|
+
/************************************************************************/
|
701
|
+
|
702
|
+
void TIFFBuildOverviews( TIFF *hTIFF, int nOverviews, int * panOvList,
|
703
|
+
int bUseSubIFDs, const char *pszResampleMethod,
|
704
|
+
int (*pfnProgress)( double, void * ),
|
705
|
+
void * pProgressData )
|
706
|
+
|
707
|
+
{
|
708
|
+
TIFFOvrCache **papoRawBIs;
|
709
|
+
uint32 nXSize, nYSize, nBlockXSize, nBlockYSize;
|
710
|
+
uint16 nBitsPerPixel, nPhotometric, nCompressFlag, nSamples,
|
711
|
+
nPlanarConfig, nSampleFormat;
|
712
|
+
int bSubsampled;
|
713
|
+
uint16 nHorSubsampling, nVerSubsampling;
|
714
|
+
int bTiled, nSXOff, nSYOff, i;
|
715
|
+
unsigned char *pabySrcTile;
|
716
|
+
uint16 *panRedMap, *panGreenMap, *panBlueMap;
|
717
|
+
TIFFErrorHandler pfnWarning;
|
718
|
+
|
719
|
+
(void) pfnProgress;
|
720
|
+
(void) pProgressData;
|
721
|
+
|
722
|
+
/* -------------------------------------------------------------------- */
|
723
|
+
/* Get the base raster size. */
|
724
|
+
/* -------------------------------------------------------------------- */
|
725
|
+
TIFFGetField( hTIFF, TIFFTAG_IMAGEWIDTH, &nXSize );
|
726
|
+
TIFFGetField( hTIFF, TIFFTAG_IMAGELENGTH, &nYSize );
|
727
|
+
|
728
|
+
TIFFGetField( hTIFF, TIFFTAG_BITSPERSAMPLE, &nBitsPerPixel );
|
729
|
+
/* TODO: nBitsPerPixel seems misnomer and may need renaming to nBitsPerSample */
|
730
|
+
TIFFGetField( hTIFF, TIFFTAG_SAMPLESPERPIXEL, &nSamples );
|
731
|
+
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_PLANARCONFIG, &nPlanarConfig );
|
732
|
+
|
733
|
+
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_PHOTOMETRIC, &nPhotometric );
|
734
|
+
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_COMPRESSION, &nCompressFlag );
|
735
|
+
TIFFGetFieldDefaulted( hTIFF, TIFFTAG_SAMPLEFORMAT, &nSampleFormat );
|
736
|
+
|
737
|
+
if( nPhotometric == PHOTOMETRIC_YCBCR || nPhotometric == PHOTOMETRIC_ITULAB )
|
738
|
+
{
|
739
|
+
if( nBitsPerPixel != 8 || nSamples != 3 || nPlanarConfig != PLANARCONFIG_CONTIG ||
|
740
|
+
nSampleFormat != SAMPLEFORMAT_UINT)
|
741
|
+
{
|
742
|
+
/* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */
|
743
|
+
TIFFErrorExt( TIFFClientdata(hTIFF), "TIFFBuildOverviews",
|
744
|
+
"File `%s' has an unsupported subsampling configuration.\n",
|
745
|
+
TIFFFileName(hTIFF) );
|
746
|
+
/* If you need support for this particular flavor, please contact either
|
747
|
+
* Frank Warmerdam warmerdam@pobox.com
|
748
|
+
* Joris Van Damme info@awaresystems.be
|
749
|
+
*/
|
750
|
+
return;
|
751
|
+
}
|
752
|
+
bSubsampled = 1;
|
753
|
+
TIFFGetField( hTIFF, TIFFTAG_YCBCRSUBSAMPLING, &nHorSubsampling, &nVerSubsampling );
|
754
|
+
/* TODO: find out if maybe TIFFGetFieldDefaulted is better choice for YCbCrSubsampling tag */
|
755
|
+
}
|
756
|
+
else
|
757
|
+
{
|
758
|
+
if( nBitsPerPixel < 8 )
|
759
|
+
{
|
760
|
+
/* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */
|
761
|
+
TIFFErrorExt( TIFFClientdata(hTIFF), "TIFFBuildOverviews",
|
762
|
+
"File `%s' has samples of %d bits per sample. Sample\n"
|
763
|
+
"sizes of less than 8 bits per sample are not supported.\n",
|
764
|
+
TIFFFileName(hTIFF), nBitsPerPixel );
|
765
|
+
return;
|
766
|
+
}
|
767
|
+
bSubsampled = 0;
|
768
|
+
nHorSubsampling = 1;
|
769
|
+
nVerSubsampling = 1;
|
770
|
+
}
|
771
|
+
|
772
|
+
/* -------------------------------------------------------------------- */
|
773
|
+
/* Turn off warnings to avoid alot of repeated warnings while */
|
774
|
+
/* rereading directories. */
|
775
|
+
/* -------------------------------------------------------------------- */
|
776
|
+
pfnWarning = TIFFSetWarningHandler( NULL );
|
777
|
+
|
778
|
+
/* -------------------------------------------------------------------- */
|
779
|
+
/* Get the base raster block size. */
|
780
|
+
/* -------------------------------------------------------------------- */
|
781
|
+
if( TIFFGetField( hTIFF, TIFFTAG_ROWSPERSTRIP, &(nBlockYSize) ) )
|
782
|
+
{
|
783
|
+
nBlockXSize = nXSize;
|
784
|
+
bTiled = FALSE;
|
785
|
+
}
|
786
|
+
else
|
787
|
+
{
|
788
|
+
TIFFGetField( hTIFF, TIFFTAG_TILEWIDTH, &nBlockXSize );
|
789
|
+
TIFFGetField( hTIFF, TIFFTAG_TILELENGTH, &nBlockYSize );
|
790
|
+
bTiled = TRUE;
|
791
|
+
}
|
792
|
+
|
793
|
+
/* -------------------------------------------------------------------- */
|
794
|
+
/* Capture the pallette if there is one. */
|
795
|
+
/* -------------------------------------------------------------------- */
|
796
|
+
if( TIFFGetField( hTIFF, TIFFTAG_COLORMAP,
|
797
|
+
&panRedMap, &panGreenMap, &panBlueMap ) )
|
798
|
+
{
|
799
|
+
uint16 *panRed2, *panGreen2, *panBlue2;
|
800
|
+
int nColorCount = 1 << nBitsPerPixel;
|
801
|
+
|
802
|
+
panRed2 = (uint16 *) _TIFFmalloc(2*nColorCount);
|
803
|
+
panGreen2 = (uint16 *) _TIFFmalloc(2*nColorCount);
|
804
|
+
panBlue2 = (uint16 *) _TIFFmalloc(2*nColorCount);
|
805
|
+
|
806
|
+
memcpy( panRed2, panRedMap, 2 * nColorCount );
|
807
|
+
memcpy( panGreen2, panGreenMap, 2 * nColorCount );
|
808
|
+
memcpy( panBlue2, panBlueMap, 2 * nColorCount );
|
809
|
+
|
810
|
+
panRedMap = panRed2;
|
811
|
+
panGreenMap = panGreen2;
|
812
|
+
panBlueMap = panBlue2;
|
813
|
+
}
|
814
|
+
else
|
815
|
+
{
|
816
|
+
panRedMap = panGreenMap = panBlueMap = NULL;
|
817
|
+
}
|
818
|
+
|
819
|
+
/* -------------------------------------------------------------------- */
|
820
|
+
/* Initialize overviews. */
|
821
|
+
/* -------------------------------------------------------------------- */
|
822
|
+
papoRawBIs = (TIFFOvrCache **) _TIFFmalloc(nOverviews*sizeof(void*));
|
823
|
+
|
824
|
+
for( i = 0; i < nOverviews; i++ )
|
825
|
+
{
|
826
|
+
uint32 nOXSize, nOYSize, nOBlockXSize, nOBlockYSize;
|
827
|
+
toff_t nDirOffset;
|
828
|
+
|
829
|
+
nOXSize = (nXSize + panOvList[i] - 1) / panOvList[i];
|
830
|
+
nOYSize = (nYSize + panOvList[i] - 1) / panOvList[i];
|
831
|
+
|
832
|
+
nOBlockXSize = MIN(nBlockXSize,nOXSize);
|
833
|
+
nOBlockYSize = MIN(nBlockYSize,nOYSize);
|
834
|
+
|
835
|
+
if( bTiled )
|
836
|
+
{
|
837
|
+
if( (nOBlockXSize % 16) != 0 )
|
838
|
+
nOBlockXSize = nOBlockXSize + 16 - (nOBlockXSize % 16);
|
839
|
+
|
840
|
+
if( (nOBlockYSize % 16) != 0 )
|
841
|
+
nOBlockYSize = nOBlockYSize + 16 - (nOBlockYSize % 16);
|
842
|
+
}
|
843
|
+
|
844
|
+
nDirOffset = TIFF_WriteOverview( hTIFF, nOXSize, nOYSize,
|
845
|
+
nBitsPerPixel, nPlanarConfig,
|
846
|
+
nSamples, nOBlockXSize, nOBlockYSize,
|
847
|
+
bTiled, nCompressFlag, nPhotometric,
|
848
|
+
nSampleFormat,
|
849
|
+
panRedMap, panGreenMap, panBlueMap,
|
850
|
+
bUseSubIFDs,
|
851
|
+
nHorSubsampling, nVerSubsampling );
|
852
|
+
|
853
|
+
papoRawBIs[i] = TIFFCreateOvrCache( hTIFF, nDirOffset );
|
854
|
+
}
|
855
|
+
|
856
|
+
if( panRedMap != NULL )
|
857
|
+
{
|
858
|
+
_TIFFfree( panRedMap );
|
859
|
+
_TIFFfree( panGreenMap );
|
860
|
+
_TIFFfree( panBlueMap );
|
861
|
+
}
|
862
|
+
|
863
|
+
/* -------------------------------------------------------------------- */
|
864
|
+
/* Allocate a buffer to hold a source block. */
|
865
|
+
/* -------------------------------------------------------------------- */
|
866
|
+
if( bTiled )
|
867
|
+
pabySrcTile = (unsigned char *) _TIFFmalloc(TIFFTileSize(hTIFF));
|
868
|
+
else
|
869
|
+
pabySrcTile = (unsigned char *) _TIFFmalloc(TIFFStripSize(hTIFF));
|
870
|
+
|
871
|
+
/* -------------------------------------------------------------------- */
|
872
|
+
/* Loop over the source raster, applying data to the */
|
873
|
+
/* destination raster. */
|
874
|
+
/* -------------------------------------------------------------------- */
|
875
|
+
for( nSYOff = 0; nSYOff < (int) nYSize; nSYOff += nBlockYSize )
|
876
|
+
{
|
877
|
+
for( nSXOff = 0; nSXOff < (int) nXSize; nSXOff += nBlockXSize )
|
878
|
+
{
|
879
|
+
/*
|
880
|
+
* Read and resample into the various overview images.
|
881
|
+
*/
|
882
|
+
|
883
|
+
TIFF_ProcessFullResBlock( hTIFF, nPlanarConfig,
|
884
|
+
bSubsampled,nHorSubsampling,nVerSubsampling,
|
885
|
+
nOverviews, panOvList,
|
886
|
+
nBitsPerPixel, nSamples, papoRawBIs,
|
887
|
+
nSXOff, nSYOff, pabySrcTile,
|
888
|
+
nBlockXSize, nBlockYSize,
|
889
|
+
nSampleFormat, pszResampleMethod );
|
890
|
+
}
|
891
|
+
}
|
892
|
+
|
893
|
+
_TIFFfree( pabySrcTile );
|
894
|
+
|
895
|
+
/* -------------------------------------------------------------------- */
|
896
|
+
/* Cleanup the rawblockedimage files. */
|
897
|
+
/* -------------------------------------------------------------------- */
|
898
|
+
for( i = 0; i < nOverviews; i++ )
|
899
|
+
{
|
900
|
+
TIFFDestroyOvrCache( papoRawBIs[i] );
|
901
|
+
}
|
902
|
+
|
903
|
+
if( papoRawBIs != NULL )
|
904
|
+
_TIFFfree( papoRawBIs );
|
905
|
+
|
906
|
+
TIFFSetWarningHandler( pfnWarning );
|
907
|
+
}
|
908
|
+
|
909
|
+
|
910
|
+
/*
|
911
|
+
* Local Variables:
|
912
|
+
* mode: c
|
913
|
+
* c-basic-offset: 4
|
914
|
+
* fill-column: 78
|
915
|
+
* End:
|
916
|
+
*/
|