laag-libtiff 4.0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,397 @@
|
|
1
|
+
/* $Id: rgb2ycbcr.c,v 1.17 2016-08-15 21:26:56 erouault Exp $ */
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Copyright (c) 1991-1997 Sam Leffler
|
5
|
+
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
6
|
+
*
|
7
|
+
* Permission to use, copy, modify, distribute, and sell this software and
|
8
|
+
* its documentation for any purpose is hereby granted without fee, provided
|
9
|
+
* that (i) the above copyright notices and this permission notice appear in
|
10
|
+
* all copies of the software and related documentation, and (ii) the names of
|
11
|
+
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
12
|
+
* publicity relating to the software without the specific, prior written
|
13
|
+
* permission of Sam Leffler and Silicon Graphics.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
17
|
+
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
18
|
+
*
|
19
|
+
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
20
|
+
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
21
|
+
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
22
|
+
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
23
|
+
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
24
|
+
* OF THIS SOFTWARE.
|
25
|
+
*/
|
26
|
+
|
27
|
+
#include "tif_config.h"
|
28
|
+
|
29
|
+
#include <stdio.h>
|
30
|
+
#include <string.h>
|
31
|
+
#include <stdlib.h>
|
32
|
+
|
33
|
+
#ifdef HAVE_UNISTD_H
|
34
|
+
# include <unistd.h>
|
35
|
+
#endif
|
36
|
+
|
37
|
+
#ifdef NEED_LIBPORT
|
38
|
+
# include "libport.h"
|
39
|
+
#endif
|
40
|
+
|
41
|
+
#include "tiffiop.h"
|
42
|
+
#include "tiffio.h"
|
43
|
+
|
44
|
+
#define streq(a,b) (strcmp(a,b) == 0)
|
45
|
+
#define CopyField(tag, v) \
|
46
|
+
if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
|
47
|
+
|
48
|
+
#ifndef howmany
|
49
|
+
#define howmany(x, y) (((x)+((y)-1))/(y))
|
50
|
+
#endif
|
51
|
+
#define roundup(x, y) (howmany(x,y)*((uint32)(y)))
|
52
|
+
|
53
|
+
#define LumaRed ycbcrCoeffs[0]
|
54
|
+
#define LumaGreen ycbcrCoeffs[1]
|
55
|
+
#define LumaBlue ycbcrCoeffs[2]
|
56
|
+
|
57
|
+
uint16 compression = COMPRESSION_PACKBITS;
|
58
|
+
uint32 rowsperstrip = (uint32) -1;
|
59
|
+
|
60
|
+
uint16 horizSubSampling = 2; /* YCbCr horizontal subsampling */
|
61
|
+
uint16 vertSubSampling = 2; /* YCbCr vertical subsampling */
|
62
|
+
float ycbcrCoeffs[3] = { .299F, .587F, .114F };
|
63
|
+
/* default coding range is CCIR Rec 601-1 with no headroom/footroom */
|
64
|
+
float refBlackWhite[6] = { 0.F, 255.F, 128.F, 255.F, 128.F, 255.F };
|
65
|
+
|
66
|
+
static int tiffcvt(TIFF* in, TIFF* out);
|
67
|
+
static void usage(int code);
|
68
|
+
static void setupLumaTables(void);
|
69
|
+
|
70
|
+
int
|
71
|
+
main(int argc, char* argv[])
|
72
|
+
{
|
73
|
+
TIFF *in, *out;
|
74
|
+
int c;
|
75
|
+
#if !HAVE_DECL_OPTARG
|
76
|
+
extern int optind;
|
77
|
+
extern char *optarg;
|
78
|
+
#endif
|
79
|
+
|
80
|
+
while ((c = getopt(argc, argv, "c:h:r:v:z")) != -1)
|
81
|
+
switch (c) {
|
82
|
+
case 'c':
|
83
|
+
if (streq(optarg, "none"))
|
84
|
+
compression = COMPRESSION_NONE;
|
85
|
+
else if (streq(optarg, "packbits"))
|
86
|
+
compression = COMPRESSION_PACKBITS;
|
87
|
+
else if (streq(optarg, "lzw"))
|
88
|
+
compression = COMPRESSION_LZW;
|
89
|
+
else if (streq(optarg, "jpeg"))
|
90
|
+
compression = COMPRESSION_JPEG;
|
91
|
+
else if (streq(optarg, "zip"))
|
92
|
+
compression = COMPRESSION_ADOBE_DEFLATE;
|
93
|
+
else
|
94
|
+
usage(-1);
|
95
|
+
break;
|
96
|
+
case 'h':
|
97
|
+
horizSubSampling = atoi(optarg);
|
98
|
+
if( horizSubSampling != 1 && horizSubSampling != 2 && horizSubSampling != 4 )
|
99
|
+
usage(-1);
|
100
|
+
break;
|
101
|
+
case 'v':
|
102
|
+
vertSubSampling = atoi(optarg);
|
103
|
+
if( vertSubSampling != 1 && vertSubSampling != 2 && vertSubSampling != 4 )
|
104
|
+
usage(-1);
|
105
|
+
break;
|
106
|
+
case 'r':
|
107
|
+
rowsperstrip = atoi(optarg);
|
108
|
+
break;
|
109
|
+
case 'z': /* CCIR Rec 601-1 w/ headroom/footroom */
|
110
|
+
refBlackWhite[0] = 16.;
|
111
|
+
refBlackWhite[1] = 235.;
|
112
|
+
refBlackWhite[2] = 128.;
|
113
|
+
refBlackWhite[3] = 240.;
|
114
|
+
refBlackWhite[4] = 128.;
|
115
|
+
refBlackWhite[5] = 240.;
|
116
|
+
break;
|
117
|
+
case '?':
|
118
|
+
usage(0);
|
119
|
+
/*NOTREACHED*/
|
120
|
+
}
|
121
|
+
if (argc - optind < 2)
|
122
|
+
usage(-1);
|
123
|
+
out = TIFFOpen(argv[argc-1], "w");
|
124
|
+
if (out == NULL)
|
125
|
+
return (-2);
|
126
|
+
setupLumaTables();
|
127
|
+
for (; optind < argc-1; optind++) {
|
128
|
+
in = TIFFOpen(argv[optind], "r");
|
129
|
+
if (in != NULL) {
|
130
|
+
do {
|
131
|
+
if (!tiffcvt(in, out) ||
|
132
|
+
!TIFFWriteDirectory(out)) {
|
133
|
+
(void) TIFFClose(out);
|
134
|
+
return (1);
|
135
|
+
}
|
136
|
+
} while (TIFFReadDirectory(in));
|
137
|
+
(void) TIFFClose(in);
|
138
|
+
}
|
139
|
+
}
|
140
|
+
(void) TIFFClose(out);
|
141
|
+
return (0);
|
142
|
+
}
|
143
|
+
|
144
|
+
float *lumaRed;
|
145
|
+
float *lumaGreen;
|
146
|
+
float *lumaBlue;
|
147
|
+
float D1, D2;
|
148
|
+
int Yzero;
|
149
|
+
|
150
|
+
static float*
|
151
|
+
setupLuma(float c)
|
152
|
+
{
|
153
|
+
float *v = (float *)_TIFFmalloc(256 * sizeof (float));
|
154
|
+
int i;
|
155
|
+
for (i = 0; i < 256; i++)
|
156
|
+
v[i] = c * i;
|
157
|
+
return (v);
|
158
|
+
}
|
159
|
+
|
160
|
+
static unsigned
|
161
|
+
V2Code(float f, float RB, float RW, int CR)
|
162
|
+
{
|
163
|
+
unsigned int c = (unsigned int)((((f)*(RW-RB)/CR)+RB)+.5);
|
164
|
+
return (c > 255 ? 255 : c);
|
165
|
+
}
|
166
|
+
|
167
|
+
static void
|
168
|
+
setupLumaTables(void)
|
169
|
+
{
|
170
|
+
lumaRed = setupLuma(LumaRed);
|
171
|
+
lumaGreen = setupLuma(LumaGreen);
|
172
|
+
lumaBlue = setupLuma(LumaBlue);
|
173
|
+
D1 = 1.F/(2.F - 2.F*LumaBlue);
|
174
|
+
D2 = 1.F/(2.F - 2.F*LumaRed);
|
175
|
+
Yzero = V2Code(0, refBlackWhite[0], refBlackWhite[1], 255);
|
176
|
+
}
|
177
|
+
|
178
|
+
static void
|
179
|
+
cvtClump(unsigned char* op, uint32* raster, uint32 ch, uint32 cw, uint32 w)
|
180
|
+
{
|
181
|
+
float Y, Cb = 0, Cr = 0;
|
182
|
+
uint32 j, k;
|
183
|
+
/*
|
184
|
+
* Convert ch-by-cw block of RGB
|
185
|
+
* to YCbCr and sample accordingly.
|
186
|
+
*/
|
187
|
+
for (k = 0; k < ch; k++) {
|
188
|
+
for (j = 0; j < cw; j++) {
|
189
|
+
uint32 RGB = (raster - k*w)[j];
|
190
|
+
Y = lumaRed[TIFFGetR(RGB)] +
|
191
|
+
lumaGreen[TIFFGetG(RGB)] +
|
192
|
+
lumaBlue[TIFFGetB(RGB)];
|
193
|
+
/* accumulate chrominance */
|
194
|
+
Cb += (TIFFGetB(RGB) - Y) * D1;
|
195
|
+
Cr += (TIFFGetR(RGB) - Y) * D2;
|
196
|
+
/* emit luminence */
|
197
|
+
*op++ = V2Code(Y,
|
198
|
+
refBlackWhite[0], refBlackWhite[1], 255);
|
199
|
+
}
|
200
|
+
for (; j < horizSubSampling; j++)
|
201
|
+
*op++ = Yzero;
|
202
|
+
}
|
203
|
+
for (; k < vertSubSampling; k++) {
|
204
|
+
for (j = 0; j < horizSubSampling; j++)
|
205
|
+
*op++ = Yzero;
|
206
|
+
}
|
207
|
+
/* emit sampled chrominance values */
|
208
|
+
*op++ = V2Code(Cb / (ch*cw), refBlackWhite[2], refBlackWhite[3], 127);
|
209
|
+
*op++ = V2Code(Cr / (ch*cw), refBlackWhite[4], refBlackWhite[5], 127);
|
210
|
+
}
|
211
|
+
#undef LumaRed
|
212
|
+
#undef LumaGreen
|
213
|
+
#undef LumaBlue
|
214
|
+
#undef V2Code
|
215
|
+
|
216
|
+
/*
|
217
|
+
* Convert a strip of RGB data to YCbCr and
|
218
|
+
* sample to generate the output data.
|
219
|
+
*/
|
220
|
+
static void
|
221
|
+
cvtStrip(unsigned char* op, uint32* raster, uint32 nrows, uint32 width)
|
222
|
+
{
|
223
|
+
uint32 x;
|
224
|
+
int clumpSize = vertSubSampling * horizSubSampling + 2;
|
225
|
+
uint32 *tp;
|
226
|
+
|
227
|
+
for (; nrows >= vertSubSampling; nrows -= vertSubSampling) {
|
228
|
+
tp = raster;
|
229
|
+
for (x = width; x >= horizSubSampling; x -= horizSubSampling) {
|
230
|
+
cvtClump(op, tp,
|
231
|
+
vertSubSampling, horizSubSampling, width);
|
232
|
+
op += clumpSize;
|
233
|
+
tp += horizSubSampling;
|
234
|
+
}
|
235
|
+
if (x > 0) {
|
236
|
+
cvtClump(op, tp, vertSubSampling, x, width);
|
237
|
+
op += clumpSize;
|
238
|
+
}
|
239
|
+
raster -= vertSubSampling*width;
|
240
|
+
}
|
241
|
+
if (nrows > 0) {
|
242
|
+
tp = raster;
|
243
|
+
for (x = width; x >= horizSubSampling; x -= horizSubSampling) {
|
244
|
+
cvtClump(op, tp, nrows, horizSubSampling, width);
|
245
|
+
op += clumpSize;
|
246
|
+
tp += horizSubSampling;
|
247
|
+
}
|
248
|
+
if (x > 0)
|
249
|
+
cvtClump(op, tp, nrows, x, width);
|
250
|
+
}
|
251
|
+
}
|
252
|
+
|
253
|
+
static int
|
254
|
+
cvtRaster(TIFF* tif, uint32* raster, uint32 width, uint32 height)
|
255
|
+
{
|
256
|
+
uint32 y;
|
257
|
+
tstrip_t strip = 0;
|
258
|
+
tsize_t cc, acc;
|
259
|
+
unsigned char* buf;
|
260
|
+
uint32 rwidth = roundup(width, horizSubSampling);
|
261
|
+
uint32 rheight = roundup(height, vertSubSampling);
|
262
|
+
uint32 nrows = (rowsperstrip > rheight ? rheight : rowsperstrip);
|
263
|
+
uint32 rnrows = roundup(nrows,vertSubSampling);
|
264
|
+
|
265
|
+
cc = rnrows*rwidth +
|
266
|
+
2*((rnrows*rwidth) / (horizSubSampling*vertSubSampling));
|
267
|
+
buf = (unsigned char*)_TIFFmalloc(cc);
|
268
|
+
// FIXME unchecked malloc
|
269
|
+
for (y = height; (int32) y > 0; y -= nrows) {
|
270
|
+
uint32 nr = (y > nrows ? nrows : y);
|
271
|
+
cvtStrip(buf, raster + (y-1)*width, nr, width);
|
272
|
+
nr = roundup(nr, vertSubSampling);
|
273
|
+
acc = nr*rwidth +
|
274
|
+
2*((nr*rwidth)/(horizSubSampling*vertSubSampling));
|
275
|
+
if (!TIFFWriteEncodedStrip(tif, strip++, buf, acc)) {
|
276
|
+
_TIFFfree(buf);
|
277
|
+
return (0);
|
278
|
+
}
|
279
|
+
}
|
280
|
+
_TIFFfree(buf);
|
281
|
+
return (1);
|
282
|
+
}
|
283
|
+
|
284
|
+
static int
|
285
|
+
tiffcvt(TIFF* in, TIFF* out)
|
286
|
+
{
|
287
|
+
uint32 width, height; /* image width & height */
|
288
|
+
uint32* raster; /* retrieve RGBA image */
|
289
|
+
uint16 shortv;
|
290
|
+
float floatv;
|
291
|
+
char *stringv;
|
292
|
+
uint32 longv;
|
293
|
+
int result;
|
294
|
+
size_t pixel_count;
|
295
|
+
|
296
|
+
TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
|
297
|
+
TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
|
298
|
+
pixel_count = width * height;
|
299
|
+
|
300
|
+
/* XXX: Check the integer overflow. */
|
301
|
+
if (!width || !height || pixel_count / width != height) {
|
302
|
+
TIFFError(TIFFFileName(in),
|
303
|
+
"Malformed input file; "
|
304
|
+
"can't allocate buffer for raster of %lux%lu size",
|
305
|
+
(unsigned long)width, (unsigned long)height);
|
306
|
+
return 0;
|
307
|
+
}
|
308
|
+
|
309
|
+
raster = (uint32*)_TIFFCheckMalloc(in, pixel_count, sizeof(uint32),
|
310
|
+
"raster buffer");
|
311
|
+
if (raster == 0) {
|
312
|
+
TIFFError(TIFFFileName(in),
|
313
|
+
"Failed to allocate buffer (%lu elements of %lu each)",
|
314
|
+
(unsigned long)pixel_count,
|
315
|
+
(unsigned long)sizeof(uint32));
|
316
|
+
return (0);
|
317
|
+
}
|
318
|
+
|
319
|
+
if (!TIFFReadRGBAImage(in, width, height, raster, 0)) {
|
320
|
+
_TIFFfree(raster);
|
321
|
+
return (0);
|
322
|
+
}
|
323
|
+
|
324
|
+
CopyField(TIFFTAG_SUBFILETYPE, longv);
|
325
|
+
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
|
326
|
+
TIFFSetField(out, TIFFTAG_IMAGELENGTH, height);
|
327
|
+
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
|
328
|
+
TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
|
329
|
+
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR);
|
330
|
+
if (compression == COMPRESSION_JPEG)
|
331
|
+
TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RAW);
|
332
|
+
CopyField(TIFFTAG_FILLORDER, shortv);
|
333
|
+
TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
|
334
|
+
TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, 3);
|
335
|
+
CopyField(TIFFTAG_XRESOLUTION, floatv);
|
336
|
+
CopyField(TIFFTAG_YRESOLUTION, floatv);
|
337
|
+
CopyField(TIFFTAG_RESOLUTIONUNIT, shortv);
|
338
|
+
TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
|
339
|
+
{ char buf[2048];
|
340
|
+
char *cp = strrchr(TIFFFileName(in), '/');
|
341
|
+
snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
|
342
|
+
cp ? cp+1 : TIFFFileName(in));
|
343
|
+
TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
|
344
|
+
}
|
345
|
+
TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
|
346
|
+
CopyField(TIFFTAG_DOCUMENTNAME, stringv);
|
347
|
+
|
348
|
+
TIFFSetField(out, TIFFTAG_REFERENCEBLACKWHITE, refBlackWhite);
|
349
|
+
TIFFSetField(out, TIFFTAG_YCBCRSUBSAMPLING,
|
350
|
+
horizSubSampling, vertSubSampling);
|
351
|
+
TIFFSetField(out, TIFFTAG_YCBCRPOSITIONING, YCBCRPOSITION_CENTERED);
|
352
|
+
TIFFSetField(out, TIFFTAG_YCBCRCOEFFICIENTS, ycbcrCoeffs);
|
353
|
+
rowsperstrip = TIFFDefaultStripSize(out, rowsperstrip);
|
354
|
+
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
|
355
|
+
|
356
|
+
result = cvtRaster(out, raster, width, height);
|
357
|
+
_TIFFfree(raster);
|
358
|
+
return result;
|
359
|
+
}
|
360
|
+
|
361
|
+
char* stuff[] = {
|
362
|
+
"usage: rgb2ycbcr [-c comp] [-r rows] [-h N] [-v N] input... output\n",
|
363
|
+
"where comp is one of the following compression algorithms:\n",
|
364
|
+
" jpeg\t\tJPEG encoding\n",
|
365
|
+
" lzw\t\tLempel-Ziv & Welch encoding\n",
|
366
|
+
" zip\t\tdeflate encoding\n",
|
367
|
+
" packbits\tPackBits encoding (default)\n",
|
368
|
+
" none\t\tno compression\n",
|
369
|
+
"and the other options are:\n",
|
370
|
+
" -r\trows/strip\n",
|
371
|
+
" -h\thorizontal sampling factor (1,2,4)\n",
|
372
|
+
" -v\tvertical sampling factor (1,2,4)\n",
|
373
|
+
NULL
|
374
|
+
};
|
375
|
+
|
376
|
+
static void
|
377
|
+
usage(int code)
|
378
|
+
{
|
379
|
+
char buf[BUFSIZ];
|
380
|
+
int i;
|
381
|
+
|
382
|
+
setbuf(stderr, buf);
|
383
|
+
|
384
|
+
fprintf(stderr, "%s\n\n", TIFFGetVersion());
|
385
|
+
for (i = 0; stuff[i] != NULL; i++)
|
386
|
+
fprintf(stderr, "%s\n", stuff[i]);
|
387
|
+
exit(code);
|
388
|
+
}
|
389
|
+
|
390
|
+
/* vim: set ts=8 sts=8 sw=8 noet: */
|
391
|
+
/*
|
392
|
+
* Local Variables:
|
393
|
+
* mode: c
|
394
|
+
* c-basic-offset: 8
|
395
|
+
* fill-column: 78
|
396
|
+
* End:
|
397
|
+
*/
|
@@ -0,0 +1,691 @@
|
|
1
|
+
/* $Id: thumbnail.c,v 1.21 2015-06-21 01:09:10 bfriesen Exp $ */
|
2
|
+
|
3
|
+
/*
|
4
|
+
* Copyright (c) 1994-1997 Sam Leffler
|
5
|
+
* Copyright (c) 1994-1997 Silicon Graphics, Inc.
|
6
|
+
*
|
7
|
+
* Permission to use, copy, modify, distribute, and sell this software and
|
8
|
+
* its documentation for any purpose is hereby granted without fee, provided
|
9
|
+
* that (i) the above copyright notices and this permission notice appear in
|
10
|
+
* all copies of the software and related documentation, and (ii) the names of
|
11
|
+
* Sam Leffler and Silicon Graphics may not be used in any advertising or
|
12
|
+
* publicity relating to the software without the specific, prior written
|
13
|
+
* permission of Sam Leffler and Silicon Graphics.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
17
|
+
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
18
|
+
*
|
19
|
+
* IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
20
|
+
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
21
|
+
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
22
|
+
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
23
|
+
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
24
|
+
* OF THIS SOFTWARE.
|
25
|
+
*/
|
26
|
+
|
27
|
+
#include "tif_config.h"
|
28
|
+
|
29
|
+
#include <stdio.h>
|
30
|
+
#include <stdlib.h>
|
31
|
+
#include <string.h>
|
32
|
+
#include <math.h>
|
33
|
+
|
34
|
+
#ifdef HAVE_UNISTD_H
|
35
|
+
# include <unistd.h>
|
36
|
+
#endif
|
37
|
+
|
38
|
+
#ifdef NEED_LIBPORT
|
39
|
+
# include "libport.h"
|
40
|
+
#endif
|
41
|
+
|
42
|
+
#include "tiffio.h"
|
43
|
+
|
44
|
+
#ifndef HAVE_GETOPT
|
45
|
+
extern int getopt(int, char**, char*);
|
46
|
+
#endif
|
47
|
+
|
48
|
+
#define streq(a,b) (strcmp(a,b) == 0)
|
49
|
+
|
50
|
+
#ifndef TIFFhowmany8
|
51
|
+
# define TIFFhowmany8(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3)
|
52
|
+
#endif
|
53
|
+
|
54
|
+
typedef enum {
|
55
|
+
EXP50,
|
56
|
+
EXP60,
|
57
|
+
EXP70,
|
58
|
+
EXP80,
|
59
|
+
EXP90,
|
60
|
+
EXP,
|
61
|
+
LINEAR
|
62
|
+
} Contrast;
|
63
|
+
|
64
|
+
static uint32 tnw = 216; /* thumbnail width */
|
65
|
+
static uint32 tnh = 274; /* thumbnail height */
|
66
|
+
static Contrast contrast = LINEAR; /* current contrast */
|
67
|
+
static uint8* thumbnail;
|
68
|
+
|
69
|
+
static int cpIFD(TIFF*, TIFF*);
|
70
|
+
static int generateThumbnail(TIFF*, TIFF*);
|
71
|
+
static void initScale();
|
72
|
+
static void usage(void);
|
73
|
+
|
74
|
+
#if !HAVE_DECL_OPTARG
|
75
|
+
extern char* optarg;
|
76
|
+
extern int optind;
|
77
|
+
#endif
|
78
|
+
|
79
|
+
int
|
80
|
+
main(int argc, char* argv[])
|
81
|
+
{
|
82
|
+
TIFF* in;
|
83
|
+
TIFF* out;
|
84
|
+
int c;
|
85
|
+
|
86
|
+
while ((c = getopt(argc, argv, "w:h:c:")) != -1) {
|
87
|
+
switch (c) {
|
88
|
+
case 'w': tnw = strtoul(optarg, NULL, 0); break;
|
89
|
+
case 'h': tnh = strtoul(optarg, NULL, 0); break;
|
90
|
+
case 'c': contrast = streq(optarg, "exp50") ? EXP50 :
|
91
|
+
streq(optarg, "exp60") ? EXP60 :
|
92
|
+
streq(optarg, "exp70") ? EXP70 :
|
93
|
+
streq(optarg, "exp80") ? EXP80 :
|
94
|
+
streq(optarg, "exp90") ? EXP90 :
|
95
|
+
streq(optarg, "exp") ? EXP :
|
96
|
+
streq(optarg, "linear")? LINEAR :
|
97
|
+
EXP;
|
98
|
+
break;
|
99
|
+
default: usage();
|
100
|
+
}
|
101
|
+
}
|
102
|
+
if (argc-optind != 2)
|
103
|
+
usage();
|
104
|
+
|
105
|
+
out = TIFFOpen(argv[optind+1], "w");
|
106
|
+
if (out == NULL)
|
107
|
+
return 2;
|
108
|
+
in = TIFFOpen(argv[optind], "r");
|
109
|
+
if( in == NULL )
|
110
|
+
return 2;
|
111
|
+
|
112
|
+
thumbnail = (uint8*) _TIFFmalloc(tnw * tnh);
|
113
|
+
if (!thumbnail) {
|
114
|
+
TIFFError(TIFFFileName(in),
|
115
|
+
"Can't allocate space for thumbnail buffer.");
|
116
|
+
return 1;
|
117
|
+
}
|
118
|
+
|
119
|
+
if (in != NULL) {
|
120
|
+
initScale();
|
121
|
+
do {
|
122
|
+
if (!generateThumbnail(in, out))
|
123
|
+
goto bad;
|
124
|
+
if (!cpIFD(in, out) || !TIFFWriteDirectory(out))
|
125
|
+
goto bad;
|
126
|
+
} while (TIFFReadDirectory(in));
|
127
|
+
(void) TIFFClose(in);
|
128
|
+
}
|
129
|
+
(void) TIFFClose(out);
|
130
|
+
return 0;
|
131
|
+
bad:
|
132
|
+
(void) TIFFClose(out);
|
133
|
+
return 1;
|
134
|
+
}
|
135
|
+
|
136
|
+
#define CopyField(tag, v) \
|
137
|
+
if (TIFFGetField(in, tag, &v)) TIFFSetField(out, tag, v)
|
138
|
+
#define CopyField2(tag, v1, v2) \
|
139
|
+
if (TIFFGetField(in, tag, &v1, &v2)) TIFFSetField(out, tag, v1, v2)
|
140
|
+
#define CopyField3(tag, v1, v2, v3) \
|
141
|
+
if (TIFFGetField(in, tag, &v1, &v2, &v3)) TIFFSetField(out, tag, v1, v2, v3)
|
142
|
+
#define CopyField4(tag, v1, v2, v3, v4) \
|
143
|
+
if (TIFFGetField(in, tag, &v1, &v2, &v3, &v4)) TIFFSetField(out, tag, v1, v2, v3, v4)
|
144
|
+
|
145
|
+
static void
|
146
|
+
cpTag(TIFF* in, TIFF* out, uint16 tag, uint16 count, TIFFDataType type)
|
147
|
+
{
|
148
|
+
switch (type) {
|
149
|
+
case TIFF_SHORT:
|
150
|
+
if (count == 1) {
|
151
|
+
uint16 shortv;
|
152
|
+
CopyField(tag, shortv);
|
153
|
+
} else if (count == 2) {
|
154
|
+
uint16 shortv1, shortv2;
|
155
|
+
CopyField2(tag, shortv1, shortv2);
|
156
|
+
} else if (count == 4) {
|
157
|
+
uint16 *tr, *tg, *tb, *ta;
|
158
|
+
CopyField4(tag, tr, tg, tb, ta);
|
159
|
+
} else if (count == (uint16) -1) {
|
160
|
+
uint16 shortv1;
|
161
|
+
uint16* shortav;
|
162
|
+
CopyField2(tag, shortv1, shortav);
|
163
|
+
}
|
164
|
+
break;
|
165
|
+
case TIFF_LONG:
|
166
|
+
{ uint32 longv;
|
167
|
+
CopyField(tag, longv);
|
168
|
+
}
|
169
|
+
break;
|
170
|
+
case TIFF_LONG8:
|
171
|
+
{ uint64 longv8;
|
172
|
+
CopyField(tag, longv8);
|
173
|
+
}
|
174
|
+
break;
|
175
|
+
case TIFF_SLONG8:
|
176
|
+
{ int64 longv8;
|
177
|
+
CopyField(tag, longv8);
|
178
|
+
}
|
179
|
+
break;
|
180
|
+
case TIFF_RATIONAL:
|
181
|
+
if (count == 1) {
|
182
|
+
float floatv;
|
183
|
+
CopyField(tag, floatv);
|
184
|
+
} else if (count == (uint16) -1) {
|
185
|
+
float* floatav;
|
186
|
+
CopyField(tag, floatav);
|
187
|
+
}
|
188
|
+
break;
|
189
|
+
case TIFF_ASCII:
|
190
|
+
{ char* stringv;
|
191
|
+
CopyField(tag, stringv);
|
192
|
+
}
|
193
|
+
break;
|
194
|
+
case TIFF_DOUBLE:
|
195
|
+
if (count == 1) {
|
196
|
+
double doublev;
|
197
|
+
CopyField(tag, doublev);
|
198
|
+
} else if (count == (uint16) -1) {
|
199
|
+
double* doubleav;
|
200
|
+
CopyField(tag, doubleav);
|
201
|
+
}
|
202
|
+
break;
|
203
|
+
case TIFF_IFD8:
|
204
|
+
{ toff_t ifd8;
|
205
|
+
CopyField(tag, ifd8);
|
206
|
+
}
|
207
|
+
break; default:
|
208
|
+
TIFFError(TIFFFileName(in),
|
209
|
+
"Data type %d is not supported, tag %d skipped.",
|
210
|
+
tag, type);
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
#undef CopyField4
|
215
|
+
#undef CopyField3
|
216
|
+
#undef CopyField2
|
217
|
+
#undef CopyField
|
218
|
+
|
219
|
+
static struct cpTag {
|
220
|
+
uint16 tag;
|
221
|
+
uint16 count;
|
222
|
+
TIFFDataType type;
|
223
|
+
} tags[] = {
|
224
|
+
{ TIFFTAG_IMAGEWIDTH, 1, TIFF_LONG },
|
225
|
+
{ TIFFTAG_IMAGELENGTH, 1, TIFF_LONG },
|
226
|
+
{ TIFFTAG_BITSPERSAMPLE, 1, TIFF_SHORT },
|
227
|
+
{ TIFFTAG_COMPRESSION, 1, TIFF_SHORT },
|
228
|
+
{ TIFFTAG_FILLORDER, 1, TIFF_SHORT },
|
229
|
+
{ TIFFTAG_SAMPLESPERPIXEL, 1, TIFF_SHORT },
|
230
|
+
{ TIFFTAG_ROWSPERSTRIP, 1, TIFF_LONG },
|
231
|
+
{ TIFFTAG_PLANARCONFIG, 1, TIFF_SHORT },
|
232
|
+
{ TIFFTAG_GROUP3OPTIONS, 1, TIFF_LONG },
|
233
|
+
{ TIFFTAG_SUBFILETYPE, 1, TIFF_LONG },
|
234
|
+
{ TIFFTAG_PHOTOMETRIC, 1, TIFF_SHORT },
|
235
|
+
{ TIFFTAG_THRESHHOLDING, 1, TIFF_SHORT },
|
236
|
+
{ TIFFTAG_DOCUMENTNAME, 1, TIFF_ASCII },
|
237
|
+
{ TIFFTAG_IMAGEDESCRIPTION, 1, TIFF_ASCII },
|
238
|
+
{ TIFFTAG_MAKE, 1, TIFF_ASCII },
|
239
|
+
{ TIFFTAG_MODEL, 1, TIFF_ASCII },
|
240
|
+
{ TIFFTAG_ORIENTATION, 1, TIFF_SHORT },
|
241
|
+
{ TIFFTAG_MINSAMPLEVALUE, 1, TIFF_SHORT },
|
242
|
+
{ TIFFTAG_MAXSAMPLEVALUE, 1, TIFF_SHORT },
|
243
|
+
{ TIFFTAG_XRESOLUTION, 1, TIFF_RATIONAL },
|
244
|
+
{ TIFFTAG_YRESOLUTION, 1, TIFF_RATIONAL },
|
245
|
+
{ TIFFTAG_PAGENAME, 1, TIFF_ASCII },
|
246
|
+
{ TIFFTAG_XPOSITION, 1, TIFF_RATIONAL },
|
247
|
+
{ TIFFTAG_YPOSITION, 1, TIFF_RATIONAL },
|
248
|
+
{ TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG },
|
249
|
+
{ TIFFTAG_RESOLUTIONUNIT, 1, TIFF_SHORT },
|
250
|
+
{ TIFFTAG_PAGENUMBER, 2, TIFF_SHORT },
|
251
|
+
{ TIFFTAG_SOFTWARE, 1, TIFF_ASCII },
|
252
|
+
{ TIFFTAG_DATETIME, 1, TIFF_ASCII },
|
253
|
+
{ TIFFTAG_ARTIST, 1, TIFF_ASCII },
|
254
|
+
{ TIFFTAG_HOSTCOMPUTER, 1, TIFF_ASCII },
|
255
|
+
{ TIFFTAG_WHITEPOINT, 2, TIFF_RATIONAL },
|
256
|
+
{ TIFFTAG_PRIMARYCHROMATICITIES, (uint16) -1,TIFF_RATIONAL },
|
257
|
+
{ TIFFTAG_HALFTONEHINTS, 2, TIFF_SHORT },
|
258
|
+
{ TIFFTAG_BADFAXLINES, 1, TIFF_LONG },
|
259
|
+
{ TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT },
|
260
|
+
{ TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG },
|
261
|
+
{ TIFFTAG_INKSET, 1, TIFF_SHORT },
|
262
|
+
/*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much more complicated logic. See tiffcp */
|
263
|
+
{ TIFFTAG_DOTRANGE, 2, TIFF_SHORT },
|
264
|
+
{ TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII },
|
265
|
+
{ TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT },
|
266
|
+
{ TIFFTAG_YCBCRCOEFFICIENTS, (uint16) -1,TIFF_RATIONAL },
|
267
|
+
{ TIFFTAG_YCBCRSUBSAMPLING, 2, TIFF_SHORT },
|
268
|
+
{ TIFFTAG_YCBCRPOSITIONING, 1, TIFF_SHORT },
|
269
|
+
{ TIFFTAG_REFERENCEBLACKWHITE, (uint16) -1,TIFF_RATIONAL },
|
270
|
+
{ TIFFTAG_EXTRASAMPLES, (uint16) -1, TIFF_SHORT },
|
271
|
+
};
|
272
|
+
#define NTAGS (sizeof (tags) / sizeof (tags[0]))
|
273
|
+
|
274
|
+
static void
|
275
|
+
cpTags(TIFF* in, TIFF* out)
|
276
|
+
{
|
277
|
+
struct cpTag *p;
|
278
|
+
for (p = tags; p < &tags[NTAGS]; p++)
|
279
|
+
{
|
280
|
+
/* Horrible: but TIFFGetField() expects 2 arguments to be passed */
|
281
|
+
/* if we request a tag that is defined in a codec, but that codec */
|
282
|
+
/* isn't used */
|
283
|
+
if( p->tag == TIFFTAG_GROUP3OPTIONS )
|
284
|
+
{
|
285
|
+
uint16 compression;
|
286
|
+
if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
|
287
|
+
compression != COMPRESSION_CCITTFAX3 )
|
288
|
+
continue;
|
289
|
+
}
|
290
|
+
if( p->tag == TIFFTAG_GROUP4OPTIONS )
|
291
|
+
{
|
292
|
+
uint16 compression;
|
293
|
+
if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
|
294
|
+
compression != COMPRESSION_CCITTFAX4 )
|
295
|
+
continue;
|
296
|
+
}
|
297
|
+
cpTag(in, out, p->tag, p->count, p->type);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
#undef NTAGS
|
301
|
+
|
302
|
+
static int
|
303
|
+
cpStrips(TIFF* in, TIFF* out)
|
304
|
+
{
|
305
|
+
tsize_t bufsize = TIFFStripSize(in);
|
306
|
+
unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize);
|
307
|
+
|
308
|
+
if (buf) {
|
309
|
+
tstrip_t s, ns = TIFFNumberOfStrips(in);
|
310
|
+
uint64 *bytecounts;
|
311
|
+
|
312
|
+
TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts);
|
313
|
+
for (s = 0; s < ns; s++) {
|
314
|
+
if (bytecounts[s] > (uint64) bufsize) {
|
315
|
+
buf = (unsigned char *)_TIFFrealloc(buf, (tmsize_t)bytecounts[s]);
|
316
|
+
if (!buf)
|
317
|
+
goto bad;
|
318
|
+
bufsize = (tmsize_t)bytecounts[s];
|
319
|
+
}
|
320
|
+
if (TIFFReadRawStrip(in, s, buf, (tmsize_t)bytecounts[s]) < 0 ||
|
321
|
+
TIFFWriteRawStrip(out, s, buf, (tmsize_t)bytecounts[s]) < 0) {
|
322
|
+
_TIFFfree(buf);
|
323
|
+
return 0;
|
324
|
+
}
|
325
|
+
}
|
326
|
+
_TIFFfree(buf);
|
327
|
+
return 1;
|
328
|
+
}
|
329
|
+
|
330
|
+
bad:
|
331
|
+
TIFFError(TIFFFileName(in),
|
332
|
+
"Can't allocate space for strip buffer.");
|
333
|
+
return 0;
|
334
|
+
}
|
335
|
+
|
336
|
+
static int
|
337
|
+
cpTiles(TIFF* in, TIFF* out)
|
338
|
+
{
|
339
|
+
tsize_t bufsize = TIFFTileSize(in);
|
340
|
+
unsigned char *buf = (unsigned char *)_TIFFmalloc(bufsize);
|
341
|
+
|
342
|
+
if (buf) {
|
343
|
+
ttile_t t, nt = TIFFNumberOfTiles(in);
|
344
|
+
uint64 *bytecounts;
|
345
|
+
|
346
|
+
TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts);
|
347
|
+
for (t = 0; t < nt; t++) {
|
348
|
+
if (bytecounts[t] > (uint64) bufsize) {
|
349
|
+
buf = (unsigned char *)_TIFFrealloc(buf, (tmsize_t)bytecounts[t]);
|
350
|
+
if (!buf)
|
351
|
+
goto bad;
|
352
|
+
bufsize = (tmsize_t)bytecounts[t];
|
353
|
+
}
|
354
|
+
if (TIFFReadRawTile(in, t, buf, (tmsize_t)bytecounts[t]) < 0 ||
|
355
|
+
TIFFWriteRawTile(out, t, buf, (tmsize_t)bytecounts[t]) < 0) {
|
356
|
+
_TIFFfree(buf);
|
357
|
+
return 0;
|
358
|
+
}
|
359
|
+
}
|
360
|
+
_TIFFfree(buf);
|
361
|
+
return 1;
|
362
|
+
}
|
363
|
+
|
364
|
+
bad:
|
365
|
+
TIFFError(TIFFFileName(in),
|
366
|
+
"Can't allocate space for tile buffer.");
|
367
|
+
return (0);
|
368
|
+
}
|
369
|
+
|
370
|
+
static int
|
371
|
+
cpIFD(TIFF* in, TIFF* out)
|
372
|
+
{
|
373
|
+
cpTags(in, out);
|
374
|
+
if (TIFFIsTiled(in)) {
|
375
|
+
if (!cpTiles(in, out))
|
376
|
+
return (0);
|
377
|
+
} else {
|
378
|
+
if (!cpStrips(in, out))
|
379
|
+
return (0);
|
380
|
+
}
|
381
|
+
return (1);
|
382
|
+
}
|
383
|
+
|
384
|
+
static uint16 photometric; /* current photometric of raster */
|
385
|
+
static uint16 filterWidth; /* filter width in pixels */
|
386
|
+
static uint32 stepSrcWidth; /* src image stepping width */
|
387
|
+
static uint32 stepDstWidth; /* dest stepping width */
|
388
|
+
static uint8* src0; /* horizontal bit stepping (start) */
|
389
|
+
static uint8* src1; /* horizontal bit stepping (middle) */
|
390
|
+
static uint8* src2; /* horizontal bit stepping (end) */
|
391
|
+
static uint32* rowoff; /* row offset for stepping */
|
392
|
+
static uint8 cmap[256]; /* colormap indexes */
|
393
|
+
static uint8 bits[256]; /* count of bits set */
|
394
|
+
|
395
|
+
static void
|
396
|
+
setupBitsTables()
|
397
|
+
{
|
398
|
+
int i;
|
399
|
+
for (i = 0; i < 256; i++) {
|
400
|
+
int n = 0;
|
401
|
+
if (i&0x01) n++;
|
402
|
+
if (i&0x02) n++;
|
403
|
+
if (i&0x04) n++;
|
404
|
+
if (i&0x08) n++;
|
405
|
+
if (i&0x10) n++;
|
406
|
+
if (i&0x20) n++;
|
407
|
+
if (i&0x40) n++;
|
408
|
+
if (i&0x80) n++;
|
409
|
+
bits[i] = n;
|
410
|
+
}
|
411
|
+
}
|
412
|
+
|
413
|
+
static int clamp(float v, int low, int high)
|
414
|
+
{ return (v < low ? low : v > high ? high : (int)v); }
|
415
|
+
|
416
|
+
#ifndef M_E
|
417
|
+
#define M_E 2.7182818284590452354
|
418
|
+
#endif
|
419
|
+
|
420
|
+
static void
|
421
|
+
expFill(float pct[], uint32 p, uint32 n)
|
422
|
+
{
|
423
|
+
uint32 i;
|
424
|
+
uint32 c = (p * n) / 100;
|
425
|
+
for (i = 1; i < c; i++)
|
426
|
+
pct[i] = (float) (1-exp(i/((double)(n-1)))/ M_E);
|
427
|
+
for (; i < n; i++)
|
428
|
+
pct[i] = 0.;
|
429
|
+
}
|
430
|
+
|
431
|
+
static void
|
432
|
+
setupCmap()
|
433
|
+
{
|
434
|
+
float pct[256]; /* known to be large enough */
|
435
|
+
uint32 i;
|
436
|
+
pct[0] = 1; /* force white */
|
437
|
+
switch (contrast) {
|
438
|
+
case EXP50: expFill(pct, 50, 256); break;
|
439
|
+
case EXP60: expFill(pct, 60, 256); break;
|
440
|
+
case EXP70: expFill(pct, 70, 256); break;
|
441
|
+
case EXP80: expFill(pct, 80, 256); break;
|
442
|
+
case EXP90: expFill(pct, 90, 256); break;
|
443
|
+
case EXP: expFill(pct, 100, 256); break;
|
444
|
+
case LINEAR:
|
445
|
+
for (i = 1; i < 256; i++)
|
446
|
+
pct[i] = 1-((float)i)/(256-1);
|
447
|
+
break;
|
448
|
+
}
|
449
|
+
switch (photometric) {
|
450
|
+
case PHOTOMETRIC_MINISWHITE:
|
451
|
+
for (i = 0; i < 256; i++)
|
452
|
+
cmap[i] = clamp(255*pct[(256-1)-i], 0, 255);
|
453
|
+
break;
|
454
|
+
case PHOTOMETRIC_MINISBLACK:
|
455
|
+
for (i = 0; i < 256; i++)
|
456
|
+
cmap[i] = clamp(255*pct[i], 0, 255);
|
457
|
+
break;
|
458
|
+
}
|
459
|
+
}
|
460
|
+
|
461
|
+
static void
|
462
|
+
initScale()
|
463
|
+
{
|
464
|
+
src0 = (uint8*) _TIFFmalloc(sizeof (uint8) * tnw);
|
465
|
+
src1 = (uint8*) _TIFFmalloc(sizeof (uint8) * tnw);
|
466
|
+
src2 = (uint8*) _TIFFmalloc(sizeof (uint8) * tnw);
|
467
|
+
rowoff = (uint32*) _TIFFmalloc(sizeof (uint32) * tnw);
|
468
|
+
filterWidth = 0;
|
469
|
+
stepDstWidth = stepSrcWidth = 0;
|
470
|
+
setupBitsTables();
|
471
|
+
}
|
472
|
+
|
473
|
+
/*
|
474
|
+
* Calculate the horizontal accumulation parameteres
|
475
|
+
* according to the widths of the src and dst images.
|
476
|
+
*/
|
477
|
+
static void
|
478
|
+
setupStepTables(uint32 sw)
|
479
|
+
{
|
480
|
+
if (stepSrcWidth != sw || stepDstWidth != tnw) {
|
481
|
+
int step = sw;
|
482
|
+
int limit = tnw;
|
483
|
+
int err = 0;
|
484
|
+
uint32 sx = 0;
|
485
|
+
uint32 x;
|
486
|
+
int fw;
|
487
|
+
uint8 b;
|
488
|
+
for (x = 0; x < tnw; x++) {
|
489
|
+
uint32 sx0 = sx;
|
490
|
+
err += step;
|
491
|
+
while (err >= limit) {
|
492
|
+
err -= limit;
|
493
|
+
sx++;
|
494
|
+
}
|
495
|
+
rowoff[x] = sx0 >> 3;
|
496
|
+
fw = sx - sx0; /* width */
|
497
|
+
b = (fw < 8) ? 0xff<<(8-fw) : 0xff;
|
498
|
+
src0[x] = b >> (sx0&7);
|
499
|
+
fw -= 8 - (sx0&7);
|
500
|
+
if (fw < 0)
|
501
|
+
fw = 0;
|
502
|
+
src1[x] = fw >> 3;
|
503
|
+
fw -= (fw>>3)<<3;
|
504
|
+
src2[x] = 0xff << (8-fw);
|
505
|
+
}
|
506
|
+
stepSrcWidth = sw;
|
507
|
+
stepDstWidth = tnw;
|
508
|
+
}
|
509
|
+
}
|
510
|
+
|
511
|
+
static void
|
512
|
+
setrow(uint8* row, uint32 nrows, const uint8* rows[])
|
513
|
+
{
|
514
|
+
uint32 x;
|
515
|
+
uint32 area = nrows * filterWidth;
|
516
|
+
for (x = 0; x < tnw; x++) {
|
517
|
+
uint32 mask0 = src0[x];
|
518
|
+
uint32 fw = src1[x];
|
519
|
+
uint32 mask1 = src1[x];
|
520
|
+
uint32 off = rowoff[x];
|
521
|
+
uint32 acc = 0;
|
522
|
+
uint32 y, i;
|
523
|
+
for (y = 0; y < nrows; y++) {
|
524
|
+
const uint8* src = rows[y] + off;
|
525
|
+
acc += bits[*src++ & mask0];
|
526
|
+
switch (fw) {
|
527
|
+
default:
|
528
|
+
for (i = fw; i > 8; i--)
|
529
|
+
acc += bits[*src++];
|
530
|
+
/* fall thru... */
|
531
|
+
case 8: acc += bits[*src++];
|
532
|
+
case 7: acc += bits[*src++];
|
533
|
+
case 6: acc += bits[*src++];
|
534
|
+
case 5: acc += bits[*src++];
|
535
|
+
case 4: acc += bits[*src++];
|
536
|
+
case 3: acc += bits[*src++];
|
537
|
+
case 2: acc += bits[*src++];
|
538
|
+
case 1: acc += bits[*src++];
|
539
|
+
case 0: break;
|
540
|
+
}
|
541
|
+
acc += bits[*src & mask1];
|
542
|
+
}
|
543
|
+
*row++ = cmap[(255*acc)/area];
|
544
|
+
}
|
545
|
+
}
|
546
|
+
|
547
|
+
/*
|
548
|
+
* Install the specified image. The
|
549
|
+
* image is resized to fit the display page using
|
550
|
+
* a box filter. The resultant pixels are mapped
|
551
|
+
* with a user-selectable contrast curve.
|
552
|
+
*/
|
553
|
+
static void
|
554
|
+
setImage1(const uint8* br, uint32 rw, uint32 rh)
|
555
|
+
{
|
556
|
+
int step = rh;
|
557
|
+
int limit = tnh;
|
558
|
+
int err = 0;
|
559
|
+
int bpr = TIFFhowmany8(rw);
|
560
|
+
int sy = 0;
|
561
|
+
uint8* row = thumbnail;
|
562
|
+
uint32 dy;
|
563
|
+
for (dy = 0; dy < tnh; dy++) {
|
564
|
+
const uint8* rows[256];
|
565
|
+
uint32 nrows = 1;
|
566
|
+
fprintf(stderr, "bpr=%d, sy=%d, bpr*sy=%d\n", bpr, sy, bpr*sy);
|
567
|
+
rows[0] = br + bpr*sy;
|
568
|
+
err += step;
|
569
|
+
while (err >= limit) {
|
570
|
+
err -= limit;
|
571
|
+
sy++;
|
572
|
+
if (err >= limit)
|
573
|
+
{
|
574
|
+
/* We should perhaps error loudly, but I can't make sense of that */
|
575
|
+
/* code... */
|
576
|
+
if( nrows == 256 )
|
577
|
+
break;
|
578
|
+
rows[nrows++] = br + bpr*sy;
|
579
|
+
}
|
580
|
+
}
|
581
|
+
setrow(row, nrows, rows);
|
582
|
+
row += tnw;
|
583
|
+
}
|
584
|
+
}
|
585
|
+
|
586
|
+
static void
|
587
|
+
setImage(const uint8* br, uint32 rw, uint32 rh)
|
588
|
+
{
|
589
|
+
filterWidth = (uint16) ceil((double) rw / (double) tnw);
|
590
|
+
setupStepTables(rw);
|
591
|
+
setImage1(br, rw, rh);
|
592
|
+
}
|
593
|
+
|
594
|
+
static int
|
595
|
+
generateThumbnail(TIFF* in, TIFF* out)
|
596
|
+
{
|
597
|
+
unsigned char* raster;
|
598
|
+
unsigned char* rp;
|
599
|
+
uint32 sw, sh, rps;
|
600
|
+
uint16 bps, spp;
|
601
|
+
tsize_t rowsize, rastersize;
|
602
|
+
tstrip_t s, ns = TIFFNumberOfStrips(in);
|
603
|
+
toff_t diroff[1];
|
604
|
+
|
605
|
+
TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &sw);
|
606
|
+
TIFFGetField(in, TIFFTAG_IMAGELENGTH, &sh);
|
607
|
+
TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps);
|
608
|
+
TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp);
|
609
|
+
TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps);
|
610
|
+
if (spp != 1 || bps != 1)
|
611
|
+
return 0;
|
612
|
+
rowsize = TIFFScanlineSize(in);
|
613
|
+
rastersize = sh * rowsize;
|
614
|
+
fprintf(stderr, "rastersize=%u\n", (unsigned int)rastersize);
|
615
|
+
/* +3 : add a few guard bytes since setrow() can read a bit */
|
616
|
+
/* outside buffer */
|
617
|
+
raster = (unsigned char*)_TIFFmalloc(rastersize+3);
|
618
|
+
if (!raster) {
|
619
|
+
TIFFError(TIFFFileName(in),
|
620
|
+
"Can't allocate space for raster buffer.");
|
621
|
+
return 0;
|
622
|
+
}
|
623
|
+
raster[rastersize] = 0;
|
624
|
+
raster[rastersize+1] = 0;
|
625
|
+
raster[rastersize+2] = 0;
|
626
|
+
rp = raster;
|
627
|
+
for (s = 0; s < ns; s++) {
|
628
|
+
(void) TIFFReadEncodedStrip(in, s, rp, -1);
|
629
|
+
rp += rps * rowsize;
|
630
|
+
}
|
631
|
+
TIFFGetField(in, TIFFTAG_PHOTOMETRIC, &photometric);
|
632
|
+
setupCmap();
|
633
|
+
setImage(raster, sw, sh);
|
634
|
+
_TIFFfree(raster);
|
635
|
+
|
636
|
+
TIFFSetField(out, TIFFTAG_SUBFILETYPE, FILETYPE_REDUCEDIMAGE);
|
637
|
+
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) tnw);
|
638
|
+
TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) tnh);
|
639
|
+
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, (uint16) 8);
|
640
|
+
TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, (uint16) 1);
|
641
|
+
TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS);
|
642
|
+
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
|
643
|
+
TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
|
644
|
+
TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
|
645
|
+
cpTag(in, out, TIFFTAG_SOFTWARE, (uint16) -1, TIFF_ASCII);
|
646
|
+
cpTag(in, out, TIFFTAG_IMAGEDESCRIPTION, (uint16) -1, TIFF_ASCII);
|
647
|
+
cpTag(in, out, TIFFTAG_DATETIME, (uint16) -1, TIFF_ASCII);
|
648
|
+
cpTag(in, out, TIFFTAG_HOSTCOMPUTER, (uint16) -1, TIFF_ASCII);
|
649
|
+
diroff[0] = 0UL;
|
650
|
+
TIFFSetField(out, TIFFTAG_SUBIFD, 1, diroff);
|
651
|
+
return (TIFFWriteEncodedStrip(out, 0, thumbnail, tnw*tnh) != -1 &&
|
652
|
+
TIFFWriteDirectory(out) != -1);
|
653
|
+
}
|
654
|
+
|
655
|
+
char* stuff[] = {
|
656
|
+
"usage: thumbnail [options] input.tif output.tif",
|
657
|
+
"where options are:",
|
658
|
+
" -h # specify thumbnail image height (default is 274)",
|
659
|
+
" -w # specify thumbnail image width (default is 216)",
|
660
|
+
"",
|
661
|
+
" -c linear use linear contrast curve",
|
662
|
+
" -c exp50 use 50% exponential contrast curve",
|
663
|
+
" -c exp60 use 60% exponential contrast curve",
|
664
|
+
" -c exp70 use 70% exponential contrast curve",
|
665
|
+
" -c exp80 use 80% exponential contrast curve",
|
666
|
+
" -c exp90 use 90% exponential contrast curve",
|
667
|
+
" -c exp use pure exponential contrast curve",
|
668
|
+
NULL
|
669
|
+
};
|
670
|
+
|
671
|
+
static void
|
672
|
+
usage(void)
|
673
|
+
{
|
674
|
+
char buf[BUFSIZ];
|
675
|
+
int i;
|
676
|
+
|
677
|
+
setbuf(stderr, buf);
|
678
|
+
fprintf(stderr, "%s\n\n", TIFFGetVersion());
|
679
|
+
for (i = 0; stuff[i] != NULL; i++)
|
680
|
+
fprintf(stderr, "%s\n", stuff[i]);
|
681
|
+
exit(-1);
|
682
|
+
}
|
683
|
+
|
684
|
+
/* vim: set ts=8 sts=8 sw=8 noet: */
|
685
|
+
/*
|
686
|
+
* Local Variables:
|
687
|
+
* mode: c
|
688
|
+
* c-basic-offset: 8
|
689
|
+
* fill-column: 78
|
690
|
+
* End:
|
691
|
+
*/
|