From 80c52a7911acc81d99f38e397707fb9c88340253 Mon Sep 17 00:00:00 2001 From: Su_Laus Date: Sat, 11 May 2024 16:49:55 +0200 Subject: [PATCH] Revert "Move most TIFF tools to archive and keep some as unsupported (see #580)." This reverts commit dec70401dc7a0f1563a5f850b96a8d5d239212bd. # Conflicts: # tools/unsupported/CMakeLists.txt # tools/unsupported/tif_tools-unsupported_versioninfo.rc --- CMakeLists.txt | 12 +- Makefile.am | 2 +- archive/test/tiffcp-g3-1d-fill.sh | 7 - archive/test/tiffcp-g3-1d.sh | 6 - archive/test/tiffcp-g3-2d-fill.sh | 7 - archive/test/tiffcp-g3-2d.sh | 6 - archive/test/tiffcp-g3.sh | 6 - archive/test/tiffcp-g4.sh | 6 - archive/test/tiffcp-logluv.sh | 7 - archive/test/tiffcp-lzw-compat.sh | 6 - archive/test/tiffcp-lzw-scanline-decode.sh | 6 - archive/test/tiffcp-split-join.sh | 16 - archive/test/tiffcp-split.sh | 13 - .../Makefile.am => cmake/OpenGLChecks.cmake | 69 ++- configure.ac | 43 +- doc/Makefile.am | 16 + doc/build.rst | 12 +- doc/conf.py | 16 + doc/functions/TIFFRGBAImage.rst | 4 +- doc/functions/libtiff.rst | 10 + doc/tools.rst | 115 ++++- {archive/doc => doc}/tools/fax2ps.rst | 0 {archive/doc => doc}/tools/fax2tiff.rst | 0 {archive/doc => doc}/tools/pal2rgb.rst | 0 {archive/doc => doc}/tools/ppm2tiff.rst | 0 {archive/doc => doc}/tools/raw2tiff.rst | 0 {archive/doc => doc}/tools/rgb2ycbcr.rst | 0 {archive/doc => doc}/tools/thumbnail.rst | 0 {archive/doc => doc}/tools/tiff2bw.rst | 0 {archive/doc => doc}/tools/tiff2pdf.rst | 0 {archive/doc => doc}/tools/tiff2ps.rst | 0 {archive/doc => doc}/tools/tiff2rgba.rst | 0 {archive/doc => doc}/tools/tiffcmp.rst | 0 doc/tools/tiffcp.rst | 4 +- {archive/doc => doc}/tools/tiffcrop.rst | 0 {archive/doc => doc}/tools/tiffdither.rst | 0 {archive/doc => doc}/tools/tiffgt.rst | 0 doc/tools/tiffinfo.rst | 5 +- {archive/doc => doc}/tools/tiffmedian.rst | 0 libtiff/tif_config.h.cmake.in | 18 + libtiff/tif_config.h.in | 18 + m4/acinclude.m4 | 402 ++++++++++++++++++ test/CMakeLists.txt | 40 +- test/Makefile.am | 192 ++++++++- {archive/test => test}/fax2tiff.sh | 0 {archive/test => test}/ppm2tiff_pbm.sh | 0 {archive/test => test}/ppm2tiff_pgm.sh | 0 {archive/test => test}/ppm2tiff_ppm.sh | 0 .../testdeflatelaststripextradata.sh | 0 test/testfax3_bug_513.sh | 24 ++ test/testfax4.sh | 24 ++ .../test => test}/tiff2bw-logluv-3c-16b.sh | 0 .../test => test}/tiff2bw-lzw-single-strip.sh | 0 .../tiff2bw-minisblack-1c-16b.sh | 0 .../test => test}/tiff2bw-minisblack-1c-8b.sh | 0 .../tiff2bw-minisblack-2c-8b-alpha.sh | 0 .../test => test}/tiff2bw-miniswhite-1c-1b.sh | 0 ...f2bw-ojpeg_chewey_subsamp21_multi_strip.sh | 0 ...ojpeg_zackthecat_subsamp22_single_strip.sh | 0 .../test => test}/tiff2bw-palette-1c-1b.sh | 0 .../test => test}/tiff2bw-palette-1c-4b.sh | 0 .../test => test}/tiff2bw-palette-1c-8b.sh | 0 .../test => test}/tiff2bw-quad-lzw-compat.sh | 0 .../test => test}/tiff2bw-quad-tile.jpg.sh | 0 .../tiff2bw-quad-tile.jpg.t1iff.sh | 0 {archive/test => test}/tiff2bw-rgb-3c-16b.sh | 0 {archive/test => test}/tiff2bw-rgb-3c-8b.sh | 0 {archive/test => test}/tiff2pdf.sh | 0 {archive/test => test}/tiff2ps-EPS1.sh | 0 {archive/test => test}/tiff2ps-PS1.sh | 0 {archive/test => test}/tiff2ps-PS2.sh | 0 {archive/test => test}/tiff2ps-PS3.sh | 0 .../test => test}/tiff2rgba-logluv-3c-16b.sh | 0 .../tiff2rgba-lzw-single-strip.sh | 0 .../tiff2rgba-minisblack-1c-16b.sh | 0 .../tiff2rgba-minisblack-1c-8b.sh | 0 .../tiff2rgba-minisblack-2c-8b-alpha.sh | 0 .../tiff2rgba-miniswhite-1c-1b.sh | 0 ...rgba-ojpeg_chewey_subsamp21_multi_strip.sh | 0 ...rgba-ojpeg_single_strip_no_rowsperstrip.sh | 0 ...ojpeg_zackthecat_subsamp22_single_strip.sh | 0 .../test => test}/tiff2rgba-palette-1c-1b.sh | 0 .../test => test}/tiff2rgba-palette-1c-4b.sh | 0 .../test => test}/tiff2rgba-palette-1c-8b.sh | 0 .../tiff2rgba-quad-lzw-compat.sh | 0 .../test => test}/tiff2rgba-quad-tile.jpg.sh | 0 .../tiff2rgba-quad-tile.jpg.t1iff.sh | 0 .../test => test}/tiff2rgba-rgb-3c-16b.sh | 0 {archive/test => test}/tiff2rgba-rgb-3c-8b.sh | 0 {archive/test => test}/tiffcp-thumbnail.sh | 0 .../tiffcrop-R90-logluv-3c-16b.sh | 0 .../tiffcrop-R90-lzw-single-strip.sh | 0 .../tiffcrop-R90-minisblack-1c-16b.sh | 0 .../tiffcrop-R90-minisblack-1c-8b.sh | 0 .../tiffcrop-R90-minisblack-2c-8b-alpha.sh | 0 .../tiffcrop-R90-miniswhite-1c-1b.sh | 0 ...-R90-ojpeg_chewey_subsamp21_multi_strip.sh | 0 ...ojpeg_zackthecat_subsamp22_single_strip.sh | 0 .../tiffcrop-R90-palette-1c-1b.sh | 0 .../tiffcrop-R90-palette-1c-4b.sh | 0 .../tiffcrop-R90-palette-1c-8b.sh | 0 .../tiffcrop-R90-quad-lzw-compat.sh | 0 .../tiffcrop-R90-quad-tile.jpg.sh | 0 .../tiffcrop-R90-quad-tile.jpg.t1iff.sh | 0 .../test => test}/tiffcrop-R90-rgb-3c-16b.sh | 0 .../test => test}/tiffcrop-R90-rgb-3c-8b.sh | 0 .../tiffcrop-doubleflip-logluv-3c-16b.sh | 0 .../tiffcrop-doubleflip-lzw-single-strip.sh | 0 .../tiffcrop-doubleflip-minisblack-1c-16b.sh | 0 .../tiffcrop-doubleflip-minisblack-1c-8b.sh | 0 ...fcrop-doubleflip-minisblack-2c-8b-alpha.sh | 0 .../tiffcrop-doubleflip-miniswhite-1c-1b.sh | 0 ...flip-ojpeg_chewey_subsamp21_multi_strip.sh | 0 ...ojpeg_zackthecat_subsamp22_single_strip.sh | 0 .../tiffcrop-doubleflip-palette-1c-1b.sh | 0 .../tiffcrop-doubleflip-palette-1c-4b.sh | 0 .../tiffcrop-doubleflip-palette-1c-8b.sh | 0 .../tiffcrop-doubleflip-quad-lzw-compat.sh | 0 .../tiffcrop-doubleflip-quad-tile.jpg.sh | 0 ...tiffcrop-doubleflip-quad-tile.jpg.t1iff.sh | 0 .../tiffcrop-doubleflip-rgb-3c-16b.sh | 0 .../tiffcrop-doubleflip-rgb-3c-8b.sh | 0 .../tiffcrop-extract-logluv-3c-16b.sh | 0 .../tiffcrop-extract-lzw-single-strip.sh | 0 .../tiffcrop-extract-minisblack-1c-16b.sh | 0 .../tiffcrop-extract-minisblack-1c-8b.sh | 0 ...tiffcrop-extract-minisblack-2c-8b-alpha.sh | 0 .../tiffcrop-extract-miniswhite-1c-1b.sh | 0 ...ract-ojpeg_chewey_subsamp21_multi_strip.sh | 0 ...ojpeg_zackthecat_subsamp22_single_strip.sh | 0 .../tiffcrop-extract-palette-1c-1b.sh | 0 .../tiffcrop-extract-palette-1c-4b.sh | 0 .../tiffcrop-extract-palette-1c-8b.sh | 0 .../tiffcrop-extract-quad-lzw-compat.sh | 0 .../tiffcrop-extract-quad-tile.jpg.sh | 0 .../tiffcrop-extract-quad-tile.jpg.t1iff.sh | 0 .../tiffcrop-extract-rgb-3c-16b.sh | 0 .../tiffcrop-extract-rgb-3c-8b.sh | 0 .../tiffcrop-extractz14-logluv-3c-16b.sh | 0 .../tiffcrop-extractz14-lzw-single-strip.sh | 0 .../tiffcrop-extractz14-minisblack-1c-16b.sh | 0 .../tiffcrop-extractz14-minisblack-1c-8b.sh | 0 ...fcrop-extractz14-minisblack-2c-8b-alpha.sh | 0 .../tiffcrop-extractz14-miniswhite-1c-1b.sh | 0 ...tz14-ojpeg_chewey_subsamp21_multi_strip.sh | 0 ...ojpeg_zackthecat_subsamp22_single_strip.sh | 0 .../tiffcrop-extractz14-palette-1c-1b.sh | 0 .../tiffcrop-extractz14-palette-1c-4b.sh | 0 .../tiffcrop-extractz14-palette-1c-8b.sh | 0 .../tiffcrop-extractz14-quad-lzw-compat.sh | 0 .../tiffcrop-extractz14-quad-tile.jpg.sh | 0 ...tiffcrop-extractz14-quad-tile.jpg.t1iff.sh | 0 .../tiffcrop-extractz14-rgb-3c-16b.sh | 0 .../tiffcrop-extractz14-rgb-3c-8b.sh | 0 tools/CMakeLists.txt | 102 ++++- tools/Makefile.am | 78 ++++ {archive/tools => tools}/fax2ps.c | 0 {archive/tools => tools}/fax2tiff.c | 0 {archive/tools => tools}/pal2rgb.c | 0 {archive/tools => tools}/ppm2tiff.c | 0 {archive/tools => tools}/raw2tiff.c | 0 {archive/tools => tools}/rgb2ycbcr.c | 0 {archive/tools => tools}/thumbnail.c | 0 {archive/tools => tools}/tiff2bw.c | 0 tools/{unsupported => }/tiff2pdf.c | 0 tools/{unsupported => }/tiff2ps.c | 0 {archive/tools => tools}/tiff2rgba.c | 0 {archive/tools => tools}/tiffcmp.c | 0 {archive/tools => tools}/tiffcrop.c | 0 {archive/tools => tools}/tiffdither.c | 0 {archive/tools => tools}/tiffgt.c | 0 {archive/tools => tools}/tiffmedian.c | 0 tools/unsupported/CMakeLists.txt | 56 --- .../tif_tools-unsupported_versioninfo.rc | 50 --- 174 files changed, 1123 insertions(+), 275 deletions(-) delete mode 100644 archive/test/tiffcp-g3-1d-fill.sh delete mode 100644 archive/test/tiffcp-g3-1d.sh delete mode 100644 archive/test/tiffcp-g3-2d-fill.sh delete mode 100644 archive/test/tiffcp-g3-2d.sh delete mode 100644 archive/test/tiffcp-g3.sh delete mode 100644 archive/test/tiffcp-g4.sh delete mode 100644 archive/test/tiffcp-logluv.sh delete mode 100644 archive/test/tiffcp-lzw-compat.sh delete mode 100644 archive/test/tiffcp-lzw-scanline-decode.sh delete mode 100644 archive/test/tiffcp-split-join.sh delete mode 100644 archive/test/tiffcp-split.sh rename tools/unsupported/Makefile.am => cmake/OpenGLChecks.cmake (52%) rename {archive/doc => doc}/tools/fax2ps.rst (100%) rename {archive/doc => doc}/tools/fax2tiff.rst (100%) rename {archive/doc => doc}/tools/pal2rgb.rst (100%) rename {archive/doc => doc}/tools/ppm2tiff.rst (100%) rename {archive/doc => doc}/tools/raw2tiff.rst (100%) rename {archive/doc => doc}/tools/rgb2ycbcr.rst (100%) rename {archive/doc => doc}/tools/thumbnail.rst (100%) rename {archive/doc => doc}/tools/tiff2bw.rst (100%) rename {archive/doc => doc}/tools/tiff2pdf.rst (100%) rename {archive/doc => doc}/tools/tiff2ps.rst (100%) rename {archive/doc => doc}/tools/tiff2rgba.rst (100%) rename {archive/doc => doc}/tools/tiffcmp.rst (100%) rename {archive/doc => doc}/tools/tiffcrop.rst (100%) rename {archive/doc => doc}/tools/tiffdither.rst (100%) rename {archive/doc => doc}/tools/tiffgt.rst (100%) rename {archive/doc => doc}/tools/tiffmedian.rst (100%) rename {archive/test => test}/fax2tiff.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/ppm2tiff_pbm.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/ppm2tiff_pgm.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/ppm2tiff_ppm.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/testdeflatelaststripextradata.sh (100%) mode change 100644 => 100755 create mode 100755 test/testfax3_bug_513.sh create mode 100755 test/testfax4.sh rename {archive/test => test}/tiff2bw-logluv-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-lzw-single-strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-minisblack-1c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-minisblack-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-minisblack-2c-8b-alpha.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-miniswhite-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-ojpeg_chewey_subsamp21_multi_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-ojpeg_zackthecat_subsamp22_single_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-palette-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-palette-1c-4b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-palette-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-quad-lzw-compat.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-quad-tile.jpg.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-quad-tile.jpg.t1iff.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-rgb-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2bw-rgb-3c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2pdf.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2ps-EPS1.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2ps-PS1.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2ps-PS2.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2ps-PS3.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-logluv-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-lzw-single-strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-minisblack-1c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-minisblack-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-minisblack-2c-8b-alpha.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-miniswhite-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-palette-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-palette-1c-4b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-palette-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-quad-lzw-compat.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-quad-tile.jpg.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-quad-tile.jpg.t1iff.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-rgb-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiff2rgba-rgb-3c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcp-thumbnail.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-logluv-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-lzw-single-strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-minisblack-1c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-minisblack-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-minisblack-2c-8b-alpha.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-miniswhite-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-ojpeg_chewey_subsamp21_multi_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-ojpeg_zackthecat_subsamp22_single_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-palette-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-palette-1c-4b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-palette-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-quad-lzw-compat.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-quad-tile.jpg.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-quad-tile.jpg.t1iff.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-rgb-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-R90-rgb-3c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-logluv-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-lzw-single-strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-minisblack-1c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-minisblack-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-miniswhite-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-ojpeg_chewey_subsamp21_multi_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-ojpeg_zackthecat_subsamp22_single_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-palette-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-palette-1c-4b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-palette-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-quad-lzw-compat.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-quad-tile.jpg.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-quad-tile.jpg.t1iff.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-rgb-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-doubleflip-rgb-3c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-logluv-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-lzw-single-strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-minisblack-1c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-minisblack-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-minisblack-2c-8b-alpha.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-miniswhite-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-ojpeg_chewey_subsamp21_multi_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-ojpeg_zackthecat_subsamp22_single_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-palette-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-palette-1c-4b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-palette-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-quad-lzw-compat.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-quad-tile.jpg.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-quad-tile.jpg.t1iff.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-rgb-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extract-rgb-3c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-logluv-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-lzw-single-strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-minisblack-1c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-minisblack-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-miniswhite-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-ojpeg_chewey_subsamp21_multi_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-ojpeg_zackthecat_subsamp22_single_strip.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-palette-1c-1b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-palette-1c-4b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-palette-1c-8b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-quad-lzw-compat.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-quad-tile.jpg.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-quad-tile.jpg.t1iff.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-rgb-3c-16b.sh (100%) mode change 100644 => 100755 rename {archive/test => test}/tiffcrop-extractz14-rgb-3c-8b.sh (100%) mode change 100644 => 100755 rename {archive/tools => tools}/fax2ps.c (100%) rename {archive/tools => tools}/fax2tiff.c (100%) rename {archive/tools => tools}/pal2rgb.c (100%) rename {archive/tools => tools}/ppm2tiff.c (100%) rename {archive/tools => tools}/raw2tiff.c (100%) rename {archive/tools => tools}/rgb2ycbcr.c (100%) rename {archive/tools => tools}/thumbnail.c (100%) rename {archive/tools => tools}/tiff2bw.c (100%) rename tools/{unsupported => }/tiff2pdf.c (100%) rename tools/{unsupported => }/tiff2ps.c (100%) rename {archive/tools => tools}/tiff2rgba.c (100%) rename {archive/tools => tools}/tiffcmp.c (100%) rename {archive/tools => tools}/tiffcrop.c (100%) rename {archive/tools => tools}/tiffdither.c (100%) rename {archive/tools => tools}/tiffgt.c (100%) rename {archive/tools => tools}/tiffmedian.c (100%) delete mode 100644 tools/unsupported/CMakeLists.txt delete mode 100644 tools/unsupported/tif_tools-unsupported_versioninfo.rc diff --git a/CMakeLists.txt b/CMakeLists.txt index 60403226..31ae5f64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,6 @@ else() endif() option(tiff-tools "build TIFF tools" ON) -option(tiff-tools-unsupported "build unsupported TIFF tools" OFF) option(tiff-tests "build TIFF tests" ON) option(tiff-contrib "build TIFF contrib" ON) option(tiff-docs "build TIFF documentation" ON) @@ -125,6 +124,9 @@ include(WebPCodec) # Option for C++ libtiffxx library include(CXXLibrary) +# Checks for OpenGL support +include(OpenGLChecks) + # Windows support include(WindowsSupport) @@ -144,9 +146,6 @@ add_subdirectory(libtiff) if(tiff-tools) add_subdirectory(tools) endif() -if(tiff-tools-unsupported) - add_subdirectory(tools/unsupported) -endif() if(tiff-tests) add_subdirectory(test) endif() @@ -177,7 +176,6 @@ message(STATUS " C compiler: ${CMAKE_C_COMPILER}") message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}") message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}") message(STATUS " Build tools: ${tiff-tools}") -message(STATUS " Build tools-unsupported: ${tiff-tools-unsupported}") message(STATUS " Build tests: ${tiff-tests}") message(STATUS " Build contrib: ${tiff-contrib}") message(STATUS " Build docs: ${tiff-docs}") @@ -228,5 +226,7 @@ message(STATUS " ZSTD support: Requested:${zstd} Availabi message(STATUS " WEBP support: Requested:${webp} Availability:${WebP_FOUND} Support:${WEBP_SUPPORT}") message(STATUS "") message(STATUS " C++ support: ${cxx} (requested) ${CXX_SUPPORT} (availability)") -# message(STATUS " X Athena Widgets support: ${HAVE_XAW}") +message(STATUS "") +# message(STATUS " X Athena Widgets support: ${HAVE_XAW}") +message(STATUS " OpenGL support: Requested:${tiff-opengl} Availability:${HAVE_OPENGL} Support:${OPENGL_SUPPORT}") message(STATUS "") diff --git a/Makefile.am b/Makefile.am index 80f6341a..dbca1b6a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,7 +60,7 @@ distcheck-hook: rm -rf $(distdir)/_build/cmake rm -rf $(distdir)/_inst/cmake -SUBDIRS = port libtiff tools build contrib test doc tools/unsupported +SUBDIRS = port libtiff tools build contrib test doc NEW_LIBTIFF_RELEASE_DATE=$(shell date +"%Y%m%d") diff --git a/archive/test/tiffcp-g3-1d-fill.sh b/archive/test/tiffcp-g3-1d-fill.sh deleted file mode 100644 index ee124983..00000000 --- a/archive/test/tiffcp-g3-1d-fill.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression, 1 dimensional -# encoding, and zero-filled boundaries. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:1d:fill" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-1d-fill.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-g3-1d.sh b/archive/test/tiffcp-g3-1d.sh deleted file mode 100644 index c11ef97f..00000000 --- a/archive/test/tiffcp-g3-1d.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression and 1 dimensional encoding. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:1d" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-1d.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-g3-2d-fill.sh b/archive/test/tiffcp-g3-2d-fill.sh deleted file mode 100644 index c25825da..00000000 --- a/archive/test/tiffcp-g3-2d-fill.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression, 2 dimensional -# encoding, and zero-filled boundaries. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:2d:fill" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-2d-fill.tiff" diff --git a/archive/test/tiffcp-g3-2d.sh b/archive/test/tiffcp-g3-2d.sh deleted file mode 100644 index 5a59dd2b..00000000 --- a/archive/test/tiffcp-g3-2d.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression and 2 dimensional encoding. -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3:2d" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-2d.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-g3.sh b/archive/test/tiffcp-g3.sh deleted file mode 100644 index d7a0107a..00000000 --- a/archive/test/tiffcp-g3.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G3 compression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g3" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-g4.sh b/archive/test/tiffcp-g4.sh deleted file mode 100644 index fb8967af..00000000 --- a/archive/test/tiffcp-g4.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with G4 compression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c g4" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g4.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-logluv.sh b/archive/test/tiffcp-logluv.sh deleted file mode 100644 index 3f62f57b..00000000 --- a/archive/test/tiffcp-logluv.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with logluv compression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c none" "${srcdir}/images/logluv-3c-16b.tiff" "o-tiffcp-logluv-raw.tiff" -f_test_convert "${TIFFCP} -c sgilog" "o-tiffcp-logluv-raw.tiff" "o-tiffcp-logluv-sgilog.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-lzw-compat.sh b/archive/test/tiffcp-lzw-compat.sh deleted file mode 100644 index bfc8d841..00000000 --- a/archive/test/tiffcp-lzw-compat.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with LZW Old-LZW decompression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c none" "${IMG_QUAD_LZW_COMPAT}" "o-tiffcp-lzw-compat.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-lzw-scanline-decode.sh b/archive/test/tiffcp-lzw-scanline-decode.sh deleted file mode 100644 index 11654d19..00000000 --- a/archive/test/tiffcp-lzw-scanline-decode.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp with LZW decompression -# -. ${srcdir:-.}/common.sh -f_test_convert "${TIFFCP} -c none -r 1" "${IMG_LZW_SINGLE_STROP}" "o-tiffcp-lzw-scanline-decode.tiff" \ No newline at end of file diff --git a/archive/test/tiffcp-split-join.sh b/archive/test/tiffcp-split-join.sh deleted file mode 100644 index d1e407c9..00000000 --- a/archive/test/tiffcp-split-join.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp + tiffsplit + tiffcp -# -# First we use tiffcp to join our test files into a multi-frame TIFF -# then we use tiffsplit to split them out again, and then we use -# tiffcp to recombine again. - -. ${srcdir:-.}/common.sh -conjoined=o-tiffcp-split-join-conjoined.tif -reconjoined=o-tiffcp-split-join-reconjoined.tif -splitfile=o-tiffcp-split-join-split- - -f_test_convert "${TIFFCP}" "${IMG_UNCOMPRESSED}" "${conjoined}" -f_test_convert "${TIFFSPLIT}" "${conjoined}" "${splitfile}" -f_test_convert "${TIFFCP}" "${splitfile}*" "${reconjoined}" \ No newline at end of file diff --git a/archive/test/tiffcp-split.sh b/archive/test/tiffcp-split.sh deleted file mode 100644 index a2f98e33..00000000 --- a/archive/test/tiffcp-split.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Basic sanity check for tiffcp + tiffsplit -# -# First we use tiffcp to join our test files into a multi-frame TIFF -# and then we use tiffsplit to split them out again. -# -. ${srcdir:-.}/common.sh -conjoined=o-tiffcp-split-conjoined.tif -splitfile=o-tiffcp-split-split- - -f_test_convert "${TIFFCP}" "${IMG_UNCOMPRESSED}" "${conjoined}" -f_test_convert "${TIFFSPLIT}" "${conjoined}" "${splitfile}" \ No newline at end of file diff --git a/tools/unsupported/Makefile.am b/cmake/OpenGLChecks.cmake similarity index 52% rename from tools/unsupported/Makefile.am rename to cmake/OpenGLChecks.cmake index 4c145d69..4b11d70f 100644 --- a/tools/unsupported/Makefile.am +++ b/cmake/OpenGLChecks.cmake @@ -1,55 +1,50 @@ -# Tag Image File Format (TIFF) Software +# Checks for OpenGL and GLUT support # -# Copyright (C) 2004, Andrey Kiselev +# Copyright © 2015 Open Microscopy Environment / University of Dundee +# Copyright © 2021 Roger Leigh +# Written by Roger Leigh # -# Permission to use, copy, modify, distribute, and sell this software and +# Permission to use, copy, modify, distribute, and sell this software and # its documentation for any purpose is hereby granted without fee, provided # that (i) the above copyright notices and this permission notice appear in # all copies of the software and related documentation, and (ii) the names of # Sam Leffler and Silicon Graphics may not be used in any advertising or # publicity relating to the software without the specific, prior written # permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# +# +# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. +# # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. -# Process this file with automake to produce Makefile.in. +# OpenGL and GLUT +set(OpenGL_GL_PREFERENCE LEGACY) -LIBPORT = $(top_builddir)/port/libport.la -LIBTIFF = $(top_builddir)/libtiff/libtiff.la +find_package(OpenGL COMPONENTS OpenGL) +find_package(GLUT) -EXTRA_DIST = \ - CMakeLists.txt +set(OPENGL_SUPPORT FALSE) +set(HAVE_OPENGL FALSE) +if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND) + set(HAVE_OPENGL TRUE) +endif() -(echo tifftoolsunsupported: $(TIFF_TOOLS_UNSUPPORTED)) -if TIFF_TOOLS_UNSUPPORTED -bin_PROGRAMS = \ - tiff2pdf \ - tiff2ps -endif +# Purely to satisfy the generated headers: +check_include_file(GL/gl.h HAVE_GL_GL_H) +check_include_file(GL/glu.h HAVE_GL_GLU_H) +check_include_file(GL/glut.h HAVE_GL_GLUT_H) +check_include_file(GLUT/glut.h HAVE_GLUT_GLUT_H) +check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H) +check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H) -EXTRA_PROGRAMS = +option(tiff-opengl "use OpenGL (required for tiffgt viewer)" ${HAVE_OPENGL}) -if HAVE_RPATH -AM_LDFLAGS = $(LIBDIR) -endif - -tiff2pdf_SOURCES = tiff2pdf.c -tiff2pdf_LDADD = $(LIBTIFF) $(LIBPORT) - -tiff2ps_SOURCES = tiff2ps.c -tiff2ps_LDADD = $(LIBTIFF) $(LIBPORT) - -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port - -echo: - (echo $(CFLAGS)) - (echo tifftoolsunsupported: $(TIFF_TOOLS_UNSUPPORTED)) +if (tiff-opengl AND HAVE_OPENGL) + set(OPENGL_SUPPORT TRUE) +endif() diff --git a/configure.ac b/configure.ac index c88b5134..c55c82d8 100644 --- a/configure.ac +++ b/configure.ac @@ -320,12 +320,6 @@ AC_ARG_ENABLE(tools, [TIFF_TOOLS=$enableval], [TIFF_TOOLS=yes]) AM_CONDITIONAL(TIFF_TOOLS, test "$TIFF_TOOLS" = "yes") -AC_ARG_ENABLE(tools-unsupported, - AS_HELP_STRING([--enable-tools-unsupported], - [Enable building of unsupported tools]), - [TIFF_TOOLS_UNSUPPORTED=$enableval], [TIFF_TOOLS_UNSUPPORTED=no]) -AM_CONDITIONAL(TIFF_TOOLS_UNSUPPORTED, test "$TIFF_TOOLS_UNSUPPORTED" = "yes") - AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests], [Disable building of tests]), @@ -966,6 +960,38 @@ fi AM_CONDITIONAL(HAVE_CXX, test "$HAVE_CXX" = "yes") +dnl --------------------------------------------------------------------------- +dnl Check for OpenGL and GLUT. +dnl --------------------------------------------------------------------------- + +HAVE_OPENGL=no + +AC_ARG_ENABLE(opengl, + AS_HELP_STRING([--disable-opengl], + [disable OpenGL usage (required by tiffgt, enabled by default)]),,) + +if test "x$enable_opengl" != "xno" ; then + + AC_PATH_XTRA + + dnl AX_CHECK_GL sets GL_CFLAGS & GL_LIBS. Also PTHREAD_LIBS, + dnl PTHREAD_CFLAGS, & PTHREAD_CC as a side-effect + AX_CHECK_GL + + dnl AX_CHECK_GLU sets GLU_CFLAGS & GLU_LIBS + AX_CHECK_GLU + + dnl AX_CHECK_GLUT sets GLUT_CFLAGS & GLUT_LIBS + AX_CHECK_GLUT + + if test "$no_x" != "yes" -a "$no_gl" != "yes" \ + -a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then + HAVE_OPENGL=yes + fi +fi + +AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes") + dnl --------------------------------------------------------------------------- dnl Check for Win32 IO: make sure we have windows.h but not cygwin dnl --------------------------------------------------------------------------- @@ -1187,8 +1213,7 @@ AC_CONFIG_FILES([Makefile \ libtiff/tiffvers.h \ port/Makefile \ test/Makefile \ - tools/Makefile \ - tools/unsupported/Makefile]) + tools/Makefile]) AC_OUTPUT dnl --------------------------------------------------------------------------- @@ -1207,7 +1232,6 @@ LOC_MSG([ Documentation directory: ${LIBTIFF_DOCDIR}]) LOC_MSG([ C compiler: ${CC} ${CFLAGS}]) LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}]) LOC_MSG([ Build tools: ${TIFF_TOOLS}]) -LOC_MSG([ Build tools-unsupported: ${TIFF_TOOLS_UNSUPPORTED}]) LOC_MSG([ Build tests: ${TIFF_TESTS}]) LOC_MSG([ Build contrib: ${TIFF_CONTRIB}]) LOC_MSG([ Build docs: ${TIFF_DOCS}]) @@ -1245,5 +1269,6 @@ LOC_MSG() LOC_MSG([ C++ support: ${HAVE_CXX}]) LOC_MSG() dnl LOC_MSG([ X Athena Widgets support: ${HAVE_XAW}]) +LOC_MSG([ OpenGL support: ${HAVE_OPENGL}]) LOC_MSG() diff --git a/doc/Makefile.am b/doc/Makefile.am index f5cb7226..89cbd0bd 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -103,10 +103,26 @@ rst_sources = \ index.rst \ build.rst \ internals.rst \ + tools/tiffgt.rst \ + tools/tiffdither.rst \ + tools/tiff2pdf.rst \ + tools/tiff2ps.rst \ + tools/ppm2tiff.rst \ + tools/raw2tiff.rst \ + tools/fax2tiff.rst \ + tools/tiffcrop.rst \ + tools/tiff2bw.rst \ + tools/fax2ps.rst \ + tools/thumbnail.rst \ + tools/tiffcmp.rst \ tools/tiffdump.rst \ + tools/tiff2rgba.rst \ tools/tiffinfo.rst \ + tools/rgb2ycbcr.rst \ tools/tiffset.rst \ tools/tiffsplit.rst \ + tools/tiffmedian.rst \ + tools/pal2rgb.rst \ tools/tiffcp.rst \ project/license.rst \ project/index.rst \ diff --git a/doc/build.rst b/doc/build.rst index 3fa80b91..71360843 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -617,16 +617,20 @@ necessary to manually do this work on a non-UNIX system. Testing the software -------------------- -You can try +Assuming you have working versions of :doc:`/tools/tiffgt`, you can now use +it to view any of the sample images available for testing, or try :doc:`/tools/tiffinfo` to display the file metadata. See the -:doc:`images` section on obtaining the test images. -Otherwise, you can do a cursory check of the library -with the :doc:`/tools/tiffcp` program. For example, +:doc:`images` section on obtaining the test images. Otherwise, you can +do a cursory check of the library with the :doc:`/tools/tiffcp` and +:doc:`/tools/tiffcmp` programs. For example, .. code-block:: shell tiffcp -lzw cramps.tif x.tif + tiffcmp cramps.tif x.tif +(:program:`tiffcmp` should be silent if the files compare +correctly). LibTIFF source files diff --git a/doc/conf.py b/doc/conf.py index fc56681a..dfa46eb4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -92,9 +92,25 @@ html_extra_path = [] man_pages = [ ('functions/libtiff', 'libtiff', 'introduction to libtiff, a library for reading and writing TIFF files', author, '3tiff'), + ('tools/fax2ps', 'fax2ps', 'convert a TIFF facsimile to compressed PostScript™', author, 1), + ('tools/fax2tiff', 'fax2tiff', 'create a TIFF Class F fax file from raw fax data', author, 1), + ('tools/pal2rgb', 'pal2rgb', 'convert a palette color TIFF image to a full color image', author, 1), + ('tools/ppm2tiff', 'ppm2tiff', 'create a TIFF file from PPM, PGM and PBM image files', author, 1), + ('tools/raw2tiff', 'raw2tiff', 'create a TIFF file from a raw data file', author, 1), + ('tools/rgb2ycbcr', 'rgb2ycbcr', 'convert non-YCbCr TIFF images to a YCbCr TIFF image', author, 1), + ('tools/thumbnail', 'thumbnail', 'create a TIFF file with thumbnail images', author, 1), + ('tools/tiff2bw', 'tiff2bw', 'convert a color TIFF image to greyscale', author, 1), + ('tools/tiff2pdf', 'tiff2pdf', 'convert a TIFF image to a PDF document', author, 1), + ('tools/tiff2ps', 'tiff2ps', 'convert TIFF image to PostScript™', author, 1), + ('tools/tiff2rgba', 'tiff2rgba', 'convert a TIFF image to RGBA color space', author, 1), + ('tools/tiffcmp', 'tiffcmp', 'compare two TIFF files', author, 1), ('tools/tiffcp', 'tiffcp', 'copy (and possibly convert) a TIFF file', author, 1), + ('tools/tiffcrop', 'tiffcrop', 'select, copy, crop, convert, extract, and/or process one or more TIFF files', author, 1), + ('tools/tiffdither', 'tiffdither', 'convert a greyscale TIFF image to bilevel using dithering', author, 1), ('tools/tiffdump', 'tiffdump', 'print verbatim information about TIFF files', author, 1), + ('tools/tiffgt', 'tiffgt', 'display an image stored in a TIFF file (Silicon Graphics version)', author, 1), ('tools/tiffinfo', 'tiffinfo', 'print information about TIFF files', author, 1), + ('tools/tiffmedian', 'tiffmedian', 'apply the median cut algorithm to data in a TIFF file', author, 1), ('tools/tiffset', 'tiffset', 'set or unset a field in a TIFF header', author, 1), ('tools/tiffsplit', 'tiffsplit', 'split a multi-image TIFF into single-image TIFF files', author, 1), diff --git a/doc/functions/TIFFRGBAImage.rst b/doc/functions/TIFFRGBAImage.rst index 250b3cb3..119d3efd 100644 --- a/doc/functions/TIFFRGBAImage.rst +++ b/doc/functions/TIFFRGBAImage.rst @@ -108,8 +108,8 @@ by overriding the put methods as described above for supporting alternate raster formats. Simply keep a reference to the default put methods setup by :c:func:`TIFFRGBAImageBegin` and then invoke them before or after -each display operation. -An example for a "put" method to +each display operation. For example, the +:doc:`/tools/tiffgt` utility uses the following put method to update the display as the raster is being filled: :: diff --git a/doc/functions/libtiff.rst b/doc/functions/libtiff.rst index bdf87973..180b8106 100644 --- a/doc/functions/libtiff.rst +++ b/doc/functions/libtiff.rst @@ -814,9 +814,19 @@ Warning messages are likewise directed through the See also -------- +:doc:`/tools/fax2tiff`, +:doc:`/tools/pal2rgb`, +:doc:`/tools/ppm2tiff`, +:doc:`/tools/rgb2ycbcr`, +:doc:`/tools/raw2tiff`, +:doc:`/tools/tiff2bw`, +:doc:`/tools/tiffdither`, :doc:`/tools/tiffdump`, :doc:`/tools/tiffcp`, +:doc:`/tools/tiffcmp`, +:doc:`/tools/tiffgt`, :doc:`/tools/tiffinfo`, +:doc:`/tools/tiffmedian`, :doc:`/tools/tiffsplit`, **"Tag Image File Format Specification *Revision 6.0*"**, diff --git a/doc/tools.rst b/doc/tools.rst index 20e233ac..df102f04 100644 --- a/doc/tools.rst +++ b/doc/tools.rst @@ -5,13 +5,12 @@ TIFF Tools Overview :width: 144 :alt: quad -Since LibTIFF version 4.6.0 only five tools are suported. -Two tools can be built as unsupported into directory -:file:`tools/unsupported`. -The source code of the other tools is moved to directory -:file:`archive/tools/`. -This source code still serves as a programming example -for the use of the TIFF library. +This software distribution comes with a small collection of +programs for converting non-TIFF format images to TIFF and for +manipulating and interrogating the contents of TIFF images. Several +of these tools are useful in their own right. Many of them however +are more intended to serve as programming examples for using the +TIFF library. Manual pages ------------ @@ -20,28 +19,120 @@ Manual pages :maxdepth: 1 :titlesonly: + tools/fax2ps + tools/fax2tiff + tools/pal2rgb + tools/ppm2tiff + tools/raw2tiff + tools/rgb2ycbcr + tools/thumbnail + tools/tiff2bw + tools/tiff2pdf + tools/tiff2ps + tools/tiff2rgba + tools/tiffcmp tools/tiffcp + tools/tiffcrop + tools/tiffdither tools/tiffdump + tools/tiffgt tools/tiffinfo + tools/tiffmedian tools/tiffset tools/tiffsplit -Programs --------- +Device-dependent Programs +------------------------- +There are two device-dependent programs that serve as simple +examples for writing programs to display and save TIFF images. -.. list-table:: Programs +.. list-table:: Device-dependent programs :widths: 5 20 :header-rows: 1 * - Tool - Description + * - :doc:`tools/tiffgt` + - Display the contents of one or more TIFF images using OpenGL. + The software makes extensive use of the ``TIFFRGBAImage`` + facilities described elsewhere. + +Device-independent Programs +--------------------------- + +The remaining programs should be device-independent: + +.. list-table:: Device-dependent programs + :widths: 5 20 + :header-rows: 1 + + * - Tool + - Description + + * - :doc:`tools/fax2ps` + - Convert a Group 3- or Group 4- compressed TIFF to PostScript + that is significantly more compressed than is generated by + :program:`tiff2ps` (unless :program:`tiff2ps` writes PS Level II) + + * - :doc:`tools/fax2tiff` + - Convert raw Group 3 or Group 4 facsimile data to TIFF + + * - :doc:`tools/pal2rgb` + - Convert a Palette-style image to a full color RGB image by + applying the colormap + + * - :doc:`tools/ppm2tiff` + - A quick hack that converts 8-bit PPM format images to TIFF + + * - :doc:`tools/raw2tiff` + - Create a TIFF file from raw data + + * - :doc:`tools/rgb2ycbcr` + - Convert an RGB, grayscale, or bilevel TIFF image to a YCbCr + TIFF image; it's mainly provided for testing + + * - :doc:`tools/thumbnail` + - Copy a bilevel TIFF to one that includes 8-bit greyscale + "thumbnail images" for each page; it is provided as an example of + how one might use the ``SubIFD`` tag (and the library support + for it) + + * - :doc:`tools/tiff2bw` + - A simple program to convert a color image to grayscale + + * - :doc:`tools/tiff2pdf` + - Convert TIFF images to PDF + + * - :doc:`tools/tiff2ps` + - Convert TIFF images to PostScript + + * - :doc:`tools/tiff2rgba` + - Convert a TIFF image to RGBA color space + + * - :doc:`tools/tiffcmp` + - Compare the contents of two TIFF files (it does not check all + the directory information, but does check all the data) * - :doc:`tools/tiffcp` - Copy, concatenate, and convert TIFF images (e.g. switching from ``Compression=5`` to ``Compression=1``) + * - :doc:`tools/tiffcrop` + - Provides selection of images from within one or more multi-image + TIFF files, with orthogonal rotation, mirroring, cropping, and + extraction of multiple sections and exporting to one or more files. + It extends the functionality of :program:`tiffcp` to support additional bit + depths in strips and tiles and enhances the selection capabilities of + tiffsplit. Bilevel images can be inverted and images may be split into + segments to fit on multiple /pages/ (standard paper sizes), plus other + functions described in the tiffcrop man page + + * - :doc:`tools/tiffdither` + - Dither a b&w image into a bilevel image (suitable for use + in creating fax files) + * - :doc:`tools/tiffdump` - Display the verbatim contents of the TIFF directory in a file (it's very useful for debugging bogus files that you may get from @@ -50,6 +141,10 @@ Programs * - :doc:`tools/tiffinfo` - Display information about one or more TIFF files + * - :doc:`tools/tiffmedian` + - A version of Paul Heckbert's median cut program that reads an + RGB TIFF image, and creates a TIFF palette file as a result + * - :doc:`tools/tiffset` - Set a field in a TIFF header diff --git a/archive/doc/tools/fax2ps.rst b/doc/tools/fax2ps.rst similarity index 100% rename from archive/doc/tools/fax2ps.rst rename to doc/tools/fax2ps.rst diff --git a/archive/doc/tools/fax2tiff.rst b/doc/tools/fax2tiff.rst similarity index 100% rename from archive/doc/tools/fax2tiff.rst rename to doc/tools/fax2tiff.rst diff --git a/archive/doc/tools/pal2rgb.rst b/doc/tools/pal2rgb.rst similarity index 100% rename from archive/doc/tools/pal2rgb.rst rename to doc/tools/pal2rgb.rst diff --git a/archive/doc/tools/ppm2tiff.rst b/doc/tools/ppm2tiff.rst similarity index 100% rename from archive/doc/tools/ppm2tiff.rst rename to doc/tools/ppm2tiff.rst diff --git a/archive/doc/tools/raw2tiff.rst b/doc/tools/raw2tiff.rst similarity index 100% rename from archive/doc/tools/raw2tiff.rst rename to doc/tools/raw2tiff.rst diff --git a/archive/doc/tools/rgb2ycbcr.rst b/doc/tools/rgb2ycbcr.rst similarity index 100% rename from archive/doc/tools/rgb2ycbcr.rst rename to doc/tools/rgb2ycbcr.rst diff --git a/archive/doc/tools/thumbnail.rst b/doc/tools/thumbnail.rst similarity index 100% rename from archive/doc/tools/thumbnail.rst rename to doc/tools/thumbnail.rst diff --git a/archive/doc/tools/tiff2bw.rst b/doc/tools/tiff2bw.rst similarity index 100% rename from archive/doc/tools/tiff2bw.rst rename to doc/tools/tiff2bw.rst diff --git a/archive/doc/tools/tiff2pdf.rst b/doc/tools/tiff2pdf.rst similarity index 100% rename from archive/doc/tools/tiff2pdf.rst rename to doc/tools/tiff2pdf.rst diff --git a/archive/doc/tools/tiff2ps.rst b/doc/tools/tiff2ps.rst similarity index 100% rename from archive/doc/tools/tiff2ps.rst rename to doc/tools/tiff2ps.rst diff --git a/archive/doc/tools/tiff2rgba.rst b/doc/tools/tiff2rgba.rst similarity index 100% rename from archive/doc/tools/tiff2rgba.rst rename to doc/tools/tiff2rgba.rst diff --git a/archive/doc/tools/tiffcmp.rst b/doc/tools/tiffcmp.rst similarity index 100% rename from archive/doc/tools/tiffcmp.rst rename to doc/tools/tiffcmp.rst diff --git a/doc/tools/tiffcp.rst b/doc/tools/tiffcp.rst index fdc6c042..b38c69f4 100644 --- a/doc/tools/tiffcp.rst +++ b/doc/tools/tiffcp.rst @@ -247,7 +247,9 @@ as follows: See also -------- +:doc:`pal2rgb` (1), :doc:`tiffinfo` (1), -:doc:`tiffdump` (1), +:doc:`tiffcmp` (1), +:doc:`tiffmedian` (1), :doc:`tiffsplit` (1), :doc:`/functions/libtiff` (3tiff) diff --git a/archive/doc/tools/tiffcrop.rst b/doc/tools/tiffcrop.rst similarity index 100% rename from archive/doc/tools/tiffcrop.rst rename to doc/tools/tiffcrop.rst diff --git a/archive/doc/tools/tiffdither.rst b/doc/tools/tiffdither.rst similarity index 100% rename from archive/doc/tools/tiffdither.rst rename to doc/tools/tiffdither.rst diff --git a/archive/doc/tools/tiffgt.rst b/doc/tools/tiffgt.rst similarity index 100% rename from archive/doc/tools/tiffgt.rst rename to doc/tools/tiffgt.rst diff --git a/doc/tools/tiffinfo.rst b/doc/tools/tiffinfo.rst index a6fdc845..864e1e8b 100644 --- a/doc/tools/tiffinfo.rst +++ b/doc/tools/tiffinfo.rst @@ -58,5 +58,8 @@ Options See also -------- -:doc:`tiffdump`, +:doc:`pal2rgb`, +:doc:`tiffcp`, +:doc:`tiffcmp`, +:doc:`tiffmedian`, :doc:`/functions/libtiff` diff --git a/archive/doc/tools/tiffmedian.rst b/doc/tools/tiffmedian.rst similarity index 100% rename from archive/doc/tools/tiffmedian.rst rename to doc/tools/tiffmedian.rst diff --git a/libtiff/tif_config.h.cmake.in b/libtiff/tif_config.h.cmake.in index 62a4c730..645cb6b3 100644 --- a/libtiff/tif_config.h.cmake.in +++ b/libtiff/tif_config.h.cmake.in @@ -40,6 +40,18 @@ /* Define to 1 if you have the `getopt' function. */ #cmakedefine HAVE_GETOPT 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GLUT_GLUT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GL_GLUT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GL_GLU_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GL_GL_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_IO_H 1 @@ -49,6 +61,12 @@ /* Define to 1 if you have the `mmap' function. */ #cmakedefine HAVE_MMAP 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_OPENGL_GLU_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_OPENGL_GL_H 1 + /* Define to 1 if you have the `setmode' function. */ #cmakedefine HAVE_SETMODE 1 diff --git a/libtiff/tif_config.h.in b/libtiff/tif_config.h.in index 28da641a..c2354bc5 100644 --- a/libtiff/tif_config.h.in +++ b/libtiff/tif_config.h.in @@ -40,6 +40,18 @@ /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT +/* Define to 1 if you have the header file. */ +#undef HAVE_GLUT_GLUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GLUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GLU_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GL_H + /* Define to 1 if you have the header file. */ #undef HAVE_IO_H @@ -49,6 +61,12 @@ /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENGL_GLU_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENGL_GL_H + /* Define to 1 if you have the `setmode' function. */ #undef HAVE_SETMODE diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index 422c9205..b54feb70 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -165,6 +165,408 @@ AC_DEFUN([AX_LANG_COMPILER_MS], ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms ])]) +dnl --------------------------------------------------------------------------- +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/ax_check_gl.html +dnl --------------------------------------------------------------------------- + +dnl SYNOPSIS +dnl +dnl AX_CHECK_GL +dnl +dnl DESCRIPTION +dnl +dnl Check for an OpenGL implementation. If GL is found, the required +dnl compiler and linker flags are included in the output variables +dnl "GL_CFLAGS" and "GL_LIBS", respectively. If no usable GL implementation +dnl is found, "no_gl" is set to "yes". +dnl +dnl If the header "GL/gl.h" is found, "HAVE_GL_GL_H" is defined. If the +dnl header "OpenGL/gl.h" is found, HAVE_OPENGL_GL_H is defined. These +dnl preprocessor definitions may not be mutually exclusive. +dnl +dnl LICENSE +dnl +dnl Copyright (c) 2009 Braden McDaniel +dnl +dnl This program is free software; you can redistribute it and/or modify it +dnl under the terms of the GNU General Public License as published by the +dnl Free Software Foundation; either version 2 of the License, or (at your +dnl option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +dnl Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License along +dnl with this program. If not, see . +dnl +dnl As a special exception, the respective Autoconf Macro's copyright owner +dnl gives unlimited permission to copy, distribute and modify the configure +dnl scripts that are the output of Autoconf when processing the Macro. You +dnl need not follow the terms of the GNU General Public License when using +dnl or distributing such scripts, even though portions of the text of the +dnl Macro appear in them. The GNU General Public License (GPL) does govern +dnl all other use of the material that constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the Autoconf +dnl Macro released by the Autoconf Archive. When you make and distribute a +dnl modified version of the Autoconf Macro, you may extend this special +dnl exception to the GPL to apply to your modified version as well. + +AC_DEFUN([AX_CHECK_GL], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PATH_X])dnl +AC_REQUIRE([AX_PTHREAD])dnl + +AC_LANG_PUSH([C]) +AX_LANG_COMPILER_MS +AS_IF([test X$ax_compiler_ms = Xno], + [GL_CFLAGS="${PTHREAD_CFLAGS}"; GL_LIBS="${PTHREAD_LIBS} -lm"]) + +dnl +dnl Use x_includes and x_libraries if they have been set (presumably by +dnl AC_PATH_X). +dnl +AS_IF([test "X$no_x" != "Xyes"], + [AS_IF([test -n "$x_includes"], + [GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}"])] + AS_IF([test -n "$x_libraries"], + [GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}"])) + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h]) +CPPFLAGS="${ax_save_CPPFLAGS}" + +AC_CHECK_HEADERS([windows.h]) + +m4_define([AX_CHECK_GL_PROGRAM], + [AC_LANG_PROGRAM([[ +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif]], + [[glBegin(0)]])]) + +AC_CACHE_CHECK([for OpenGL library], [ax_cv_check_gl_libgl], +[ax_cv_check_gl_libgl="no" +case $host_cpu in + x86_64) ax_check_gl_libdir=lib64 ;; + *) ax_check_gl_libdir=lib ;; +esac +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lopengl32 -lGL" +for ax_lib in ${ax_check_libs}; do + AS_IF([test X$ax_compiler_ms = Xyes], + [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], + [ax_try_lib="${ax_lib}"]) + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="${ax_try_lib}"; break], + [ax_check_gl_nvidia_flags="-L/usr/${ax_check_gl_libdir}/nvidia" LIBS="${ax_try_lib} ${ax_check_gl_nvidia_flags} ${GL_LIBS} ${ax_save_LIBS}" +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_nvidia_flags}"; break], + [ax_check_gl_dylib_flag='-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' LIBS="${ax_try_lib} ${ax_check_gl_dylib_flag} ${GL_LIBS} ${ax_save_LIBS}" +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_dylib_flag}"; break])])]) +done + +AS_IF([test "X$ax_cv_check_gl_libgl" = Xno -a "X$no_x" = Xyes], +[LIBS='-framework OpenGL' +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="$LIBS"])]) + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS}]) + +AS_IF([test "X$ax_cv_check_gl_libgl" = Xno], + [no_gl=yes; GL_CFLAGS=""; GL_LIBS=""], + [GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}"]) +AC_LANG_POP([C]) + +AC_SUBST([GL_CFLAGS]) +AC_SUBST([GL_LIBS]) +])dnl + +dnl --------------------------------------------------------------------------- +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/ax_check_glu.html +dnl --------------------------------------------------------------------------- + +dnl SYNOPSIS +dnl +dnl AX_CHECK_GLU +dnl +dnl DESCRIPTION +dnl +dnl Check for GLU. If GLU is found, the required preprocessor and linker +dnl flags are included in the output variables "GLU_CFLAGS" and "GLU_LIBS", +dnl respectively. If no GLU implementation is found, "no_glu" is set to +dnl "yes". +dnl +dnl If the header "GL/glu.h" is found, "HAVE_GL_GLU_H" is defined. If the +dnl header "OpenGL/glu.h" is found, HAVE_OPENGL_GLU_H is defined. These +dnl preprocessor definitions may not be mutually exclusive. +dnl +dnl Some implementations (in particular, some versions of Mac OS X) are +dnl known to treat the GLU tesselator callback function type as "GLvoid +dnl (*)(...)" rather than the standard "GLvoid (*)()". If the former +dnl condition is detected, this macro defines "HAVE_VARARGS_GLU_TESSCB". +dnl +dnl LICENSE +dnl +dnl Copyright (c) 2009 Braden McDaniel +dnl +dnl This program is free software; you can redistribute it and/or modify it +dnl under the terms of the GNU General Public License as published by the +dnl Free Software Foundation; either version 2 of the License, or (at your +dnl option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +dnl Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License along +dnl with this program. If not, see . +dnl +dnl As a special exception, the respective Autoconf Macro's copyright owner +dnl gives unlimited permission to copy, distribute and modify the configure +dnl scripts that are the output of Autoconf when processing the Macro. You +dnl need not follow the terms of the GNU General Public License when using +dnl or distributing such scripts, even though portions of the text of the +dnl Macro appear in them. The GNU General Public License (GPL) does govern +dnl all other use of the material that constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the Autoconf +dnl Macro released by the Autoconf Archive. When you make and distribute a +dnl modified version of the Autoconf Macro, you may extend this special +dnl exception to the GPL to apply to your modified version as well. + +AC_DEFUN([AX_CHECK_GLU], +[AC_REQUIRE([AX_CHECK_GL])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +GLU_CFLAGS="${GL_CFLAGS}" + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h]) +CPPFLAGS="${ax_save_CPPFLAGS}" + +m4_define([AX_CHECK_GLU_PROGRAM], + [AC_LANG_PROGRAM([[ +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif]], + [[gluBeginCurve(0)]])]) + +AC_CACHE_CHECK([for OpenGL Utility library], [ax_cv_check_glu_libglu], +[ax_cv_check_glu_libglu="no" +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" + +dnl +dnl First, check for the possibility that everything we need is already in +dnl GL_LIBS. +dnl +LIBS="${GL_LIBS} ${ax_save_LIBS}" +dnl +dnl libGLU typically links with libstdc++ on POSIX platforms. +dnl However, setting the language to C++ means that test program +dnl source is named "conftest.cc"; and Microsoft cl doesn't know what +dnl to do with such a file. +dnl +AC_LANG_PUSH([C++]) +AS_IF([test X$ax_compiler_ms = Xyes], + [AC_LANG_PUSH([C])]) +AC_LINK_IFELSE( +[AX_CHECK_GLU_PROGRAM], +[ax_cv_check_glu_libglu=yes], +[LIBS="" +ax_check_libs="-lglu32 -lGLU" +for ax_lib in ${ax_check_libs}; do + AS_IF([test X$ax_compiler_ms = Xyes], + [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], + [ax_try_lib="${ax_lib}"]) + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" + AC_LINK_IFELSE([AX_CHECK_GLU_PROGRAM], + [ax_cv_check_glu_libglu="${ax_try_lib}"; break]) +done +]) +AS_IF([test X$ax_compiler_ms = Xyes], + [AC_LANG_POP([C])]) +AC_LANG_POP([C++]) + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS}]) +AS_IF([test "X$ax_cv_check_glu_libglu" = Xno], + [no_glu=yes; GLU_CFLAGS=""; GLU_LIBS=""], + [AS_IF([test "X$ax_cv_check_glu_libglu" = Xyes], + [GLU_LIBS="$GL_LIBS"], + [GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}"])]) +AC_SUBST([GLU_CFLAGS]) +AC_SUBST([GLU_LIBS]) + +dnl +dnl Some versions of Mac OS X include a broken interpretation of the GLU +dnl tesselation callback function signature. +dnl +AS_IF([test "X$ax_cv_check_glu_libglu" != Xno], +[AC_CACHE_CHECK([for varargs GLU tesselator callback function type], + [ax_cv_varargs_glu_tesscb], +[ax_cv_varargs_glu_tesscb=no +ax_save_CFLAGS="$CFLAGS" +CFLAGS="$GL_CFLAGS $CFLAGS" +AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([[ +# ifdef HAVE_GL_GLU_H +# include +# else +# include +# endif]], + [[GLvoid (*func)(...); gluTessCallback(0, 0, func)]])], +[ax_cv_varargs_glu_tesscb=yes]) +CFLAGS="$ax_save_CFLAGS"]) +AS_IF([test X$ax_cv_varargs_glu_tesscb = Xyes], + [AC_DEFINE([HAVE_VARARGS_GLU_TESSCB], [1], + [Use nonstandard varargs form for the GLU tesselator callback])])]) +]) + +dnl --------------------------------------------------------------------------- +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/ax_check_glut.html +dnl --------------------------------------------------------------------------- + +dnl +dnl SYNOPSIS +dnl +dnl AX_CHECK_GLUT +dnl +dnl DESCRIPTION +dnl +dnl Check for GLUT. If GLUT is found, the required compiler and linker flags +dnl are included in the output variables "GLUT_CFLAGS" and "GLUT_LIBS", +dnl respectively. If GLUT is not found, "no_glut" is set to "yes". +dnl +dnl If the header "GL/glut.h" is found, "HAVE_GL_GLUT_H" is defined. If the +dnl header "GLUT/glut.h" is found, HAVE_GLUT_GLUT_H is defined. These +dnl preprocessor definitions may not be mutually exclusive. +dnl +dnl LICENSE +dnl +dnl Copyright (c) 2009 Braden McDaniel +dnl +dnl This program is free software; you can redistribute it and/or modify it +dnl under the terms of the GNU General Public License as published by the +dnl Free Software Foundation; either version 2 of the License, or (at your +dnl option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +dnl Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License along +dnl with this program. If not, see . +dnl +dnl As a special exception, the respective Autoconf Macro's copyright owner +dnl gives unlimited permission to copy, distribute and modify the configure +dnl scripts that are the output of Autoconf when processing the Macro. You +dnl need not follow the terms of the GNU General Public License when using +dnl or distributing such scripts, even though portions of the text of the +dnl Macro appear in them. The GNU General Public License (GPL) does govern +dnl all other use of the material that constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the Autoconf +dnl Macro released by the Autoconf Archive. When you make and distribute a +dnl modified version of the Autoconf Macro, you may extend this special +dnl exception to the GPL to apply to your modified version as well. + +AC_DEFUN([AX_CHECK_GLUT], +[AC_REQUIRE([AX_CHECK_GLU])dnl +AC_REQUIRE([AC_PATH_XTRA])dnl + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLU_CFLAGS} ${CPPFLAGS}" +AC_CHECK_HEADERS([GL/glut.h GLUT/glut.h]) +CPPFLAGS="${ax_save_CPPFLAGS}" + +GLUT_CFLAGS=${GLU_CFLAGS} +GLUT_LIBS=${GLU_LIBS} + +m4_define([AX_CHECK_GLUT_PROGRAM], + [AC_LANG_PROGRAM([[ +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLUT_H +# include +# elif defined(HAVE_GLUT_GLUT_H) +# include +# else +# error no glut.h +# endif]], + [[glutMainLoop()]])]) + +dnl +dnl If X is present, assume GLUT depends on it. +dnl +AS_IF([test X$no_x != Xyes], + [GLUT_LIBS="${X_PRE_LIBS} -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}"]) + +AC_CACHE_CHECK([for GLUT library], [ax_cv_check_glut_libglut], +[ax_cv_check_glut_libglut="no" +AC_LANG_PUSH(C) +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lglut32 -lglut" +for ax_lib in ${ax_check_libs}; do + AS_IF([test X$ax_compiler_ms = Xyes], + [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], + [ax_try_lib="${ax_lib}"]) + LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" + AC_LINK_IFELSE([AX_CHECK_GLUT_PROGRAM], + [ax_cv_check_glut_libglut="${ax_try_lib}"; break]) +done + +AS_IF([test "X$ax_cv_check_glut_libglut" = Xno -a "X$no_x" = Xyes], +[LIBS='-framework GLUT' +AC_LINK_IFELSE([AX_CHECK_GLUT_PROGRAM], + [ax_cv_check_glut_libglut="$LIBS"])]) + +CPPFLAGS="${ax_save_CPPFLAGS}" +LIBS="${ax_save_LIBS}" +AC_LANG_POP(C)]) + +AS_IF([test "X$ax_cv_check_glut_libglut" = Xno], + [no_glut="yes"; GLUT_CFLAGS=""; GLUT_LIBS=""], + [GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}"]) + +AC_SUBST([GLUT_CFLAGS]) +AC_SUBST([GLUT_LIBS]) +])dnl + dnl --------------------------------------------------------------------------- dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/autoconf-archive/ax_pthread.html diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 55c483d9..eb89c4f4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -102,7 +102,6 @@ set(noinst_HEADERS tifftest.h) set(simple_tests) -# Test programs add_executable(test_signed_tags ../placeholder.h) target_sources(test_signed_tags PRIVATE test_signed_tags.c) target_link_libraries(test_signed_tags PRIVATE tiff tiff_port) @@ -381,10 +380,13 @@ foreach(target IN LISTS simple_tests) endforeach() if(tiff-tools) -# Reading / writing TIFF images with different encoding schemes. -add_convert_tests(tiffcp TIFFIMG "" TIFFIMAGES TRUE) + # PPM + add_convert_test(ppm2tiff miniswhite "" "images/miniswhite-1c-1b.pbm" TRUE) + add_convert_test(ppm2tiff minisblack "" "images/minisblack-1c-8b.pgm" TRUE) + add_convert_test(ppm2tiff rgb "" "images/rgb-3c-16b.ppm" TRUE) + add_convert_test(ppm2tiff rgb "" "images/rgb-3c-8b.ppm" TRUE) -# Convert some images to another coding scheme. + # tiffcp add_convert_test(tiffcp g3 "-c g3" "images/miniswhite-1c-1b.tiff" FALSE) add_convert_test(tiffcp g31d "-c g3:1d" "images/miniswhite-1c-1b.tiff" FALSE) add_convert_test(tiffcp g31dfill "-c g3:1d:fill" "images/miniswhite-1c-1b.tiff" FALSE) @@ -393,6 +395,8 @@ add_convert_tests(tiffcp TIFFIMG "" TIFFIMAGES TRUE) add_convert_test(tiffcp g4 "-c g4" "images/miniswhite-1c-1b.tiff" FALSE) add_convert_test_multi(tiffcp tiffcp "" logluv "-c none" "-c sgilog" "" "images/logluv-3c-16b.tiff" FALSE) + add_convert_test_multi(tiffcp thumbnail "" thumbnail "-c g3:1d" "" "" + "images/miniswhite-1c-1b.tiff" FALSE) add_convert_test(tiffcp none "-c none" "images/quad-lzw-compat.tiff" FALSE) add_convert_test(tiffcp noner1 "-c none -r 1" "images/lzw-single-strip.tiff" FALSE) add_convert_test(tiffcp float64_lzw_2_le "-c lzw:2" "images/test_float64_predictor2_le_lzw.tif" FALSE) @@ -400,10 +404,6 @@ add_convert_tests(tiffcp TIFFIMG "" TIFFIMAGES TRUE) if(WEBP_SUPPORT) add_convert_test(tiffcp webp_lossless_rgba_alpha_fully_opaque "-c none" "images/webp_lossless_rgba_alpha_fully_opaque.tif" FALSE) endif() -# Old-JPEG tests -#--- tiffcp does not support subsampled images, as the OldJPEG ones are --- -# ToDo: a test for OldJPEG is missing. -#add_convert_tests(test_tiffcp OldJPEG "" TIFFIMAGES_OJPEG TRUE) # tiffdump add_reader_test(tiffdump "" "images/miniswhite-1c-1b.tiff") @@ -434,4 +434,28 @@ add_convert_tests(tiffcp TIFFIMG "" TIFFIMAGES TRUE) ${tiff_test_extra_args} -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffSplitTest.cmake") + # PDF + add_stdout_test(tiff2pdf "" "" "images/miniswhite-1c-1b.tiff" TRUE) + + # PS + add_stdout_test(tiff2ps "ps-1" "-a -p -1" "images/miniswhite-1c-1b.tiff" TRUE) + add_stdout_test(tiff2ps "ps-2" "-a -p -2" "images/miniswhite-1c-1b.tiff" TRUE) + add_stdout_test(tiff2ps "ps-3" "-a -p -3" "images/miniswhite-1c-1b.tiff" TRUE) + add_stdout_test(tiff2ps "eps-1" "-e -1" "images/miniswhite-1c-1b.tiff" TRUE) + + # BW + add_convert_tests(tiff2bw default "" RGBIMAGES TRUE) + + # RGBA + add_convert_tests(tiff2rgba default "" TIFFIMAGES TRUE) + # RGBA (old-jpeg) + add_convert_tests(tiff2rgba default "" TIFFIMAGES_OJPEG TRUE) + # Test rotations + add_convert_tests(tiffcrop R90 "-R90" TIFFIMAGES TRUE) + # Test flip (mirror) + add_convert_tests(tiffcrop doubleflip "-F both" TIFFIMAGES TRUE) + # Test extracting a section 60 pixels wide and 60 pixels high + add_convert_tests(tiffcrop extract "-U px -E top -X 60 -Y 60" TIFFIMAGES TRUE) + # Test extracting the first and fourth quarters from the left side. + add_convert_tests(tiffcrop extractz14 "-E left -Z1:4,2:4" TIFFIMAGES TRUE) endif() diff --git a/test/Makefile.am b/test/Makefile.am index 1ec348b3..ed0ae4d2 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -57,8 +57,11 @@ CLEANFILES = test_packbits.tif o-* if HAVE_JPEG if TIFF_TOOLS JPEG_DEPENDENT_CHECK_PROG=raw_decode -# No tiff2rgba tool anymore and therefore not JPEG_DEPENDENT_TESTSCRIPTS -JPEG_DEPENDENT_TESTSCRIPTS= +JPEG_DEPENDENT_TESTSCRIPTS=\ + tiff2rgba-quad-tile.jpg.sh \ + tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \ + tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \ + tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh endif else JPEG_DEPENDENT_CHECK_PROG= @@ -80,6 +83,10 @@ endif # Test scripts to execute if TIFF_TOOLS TESTSCRIPTS = \ + ppm2tiff_pbm.sh \ + ppm2tiff_pgm.sh \ + ppm2tiff_ppm.sh \ + fax2tiff.sh \ tiffcp-g3.sh \ tiffcp-g3-1d.sh \ tiffcp-g3-1d-fill.sh \ @@ -87,12 +94,74 @@ TESTSCRIPTS = \ tiffcp-g3-2d-fill.sh \ tiffcp-g4.sh \ tiffcp-logluv.sh \ + tiffcp-thumbnail.sh \ tiffcp-lzw-compat.sh \ tiffcp-lzw-scanline-decode.sh \ tiffdump.sh \ tiffinfo.sh \ tiffcp-split.sh \ tiffcp-split-join.sh \ + tiff2ps-PS1.sh \ + tiff2ps-PS2.sh \ + tiff2ps-PS3.sh \ + tiff2ps-EPS1.sh \ + tiff2pdf.sh \ + tiffcrop-doubleflip-logluv-3c-16b.sh \ + tiffcrop-doubleflip-minisblack-1c-16b.sh \ + tiffcrop-doubleflip-minisblack-1c-8b.sh \ + tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \ + tiffcrop-doubleflip-miniswhite-1c-1b.sh \ + tiffcrop-doubleflip-palette-1c-1b.sh \ + tiffcrop-doubleflip-palette-1c-4b.sh \ + tiffcrop-doubleflip-palette-1c-8b.sh \ + tiffcrop-doubleflip-rgb-3c-16b.sh \ + tiffcrop-doubleflip-rgb-3c-8b.sh \ + tiffcrop-extract-logluv-3c-16b.sh \ + tiffcrop-extract-minisblack-1c-16b.sh \ + tiffcrop-extract-minisblack-1c-8b.sh \ + tiffcrop-extract-minisblack-2c-8b-alpha.sh \ + tiffcrop-extract-miniswhite-1c-1b.sh \ + tiffcrop-extract-palette-1c-1b.sh \ + tiffcrop-extract-palette-1c-4b.sh \ + tiffcrop-extract-palette-1c-8b.sh \ + tiffcrop-extract-rgb-3c-16b.sh \ + tiffcrop-extract-rgb-3c-8b.sh \ + tiffcrop-extractz14-logluv-3c-16b.sh \ + tiffcrop-extractz14-minisblack-1c-16b.sh \ + tiffcrop-extractz14-minisblack-1c-8b.sh \ + tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \ + tiffcrop-extractz14-miniswhite-1c-1b.sh \ + tiffcrop-extractz14-palette-1c-1b.sh \ + tiffcrop-extractz14-palette-1c-4b.sh \ + tiffcrop-extractz14-palette-1c-8b.sh \ + tiffcrop-extractz14-rgb-3c-16b.sh \ + tiffcrop-extractz14-rgb-3c-8b.sh \ + tiffcrop-R90-logluv-3c-16b.sh \ + tiffcrop-R90-minisblack-1c-16b.sh \ + tiffcrop-R90-minisblack-1c-8b.sh \ + tiffcrop-R90-minisblack-2c-8b-alpha.sh \ + tiffcrop-R90-miniswhite-1c-1b.sh \ + tiffcrop-R90-palette-1c-1b.sh \ + tiffcrop-R90-palette-1c-4b.sh \ + tiffcrop-R90-palette-1c-8b.sh \ + tiffcrop-R90-rgb-3c-16b.sh \ + tiffcrop-R90-rgb-3c-8b.sh \ + tiff2bw-palette-1c-8b.sh \ + tiff2bw-quad-lzw-compat.sh \ + tiff2bw-rgb-3c-8b.sh \ + tiff2rgba-logluv-3c-16b.sh \ + tiff2rgba-minisblack-1c-16b.sh \ + tiff2rgba-minisblack-1c-8b.sh \ + tiff2rgba-minisblack-2c-8b-alpha.sh \ + tiff2rgba-miniswhite-1c-1b.sh \ + tiff2rgba-palette-1c-1b.sh \ + tiff2rgba-palette-1c-4b.sh \ + tiff2rgba-palette-1c-8b.sh \ + tiff2rgba-rgb-3c-16b.sh \ + tiff2rgba-rgb-3c-8b.sh \ + testfax4.sh \ + testfax3_bug_513.sh \ + testdeflatelaststripextradata.sh \ $(JPEG_DEPENDENT_TESTSCRIPTS) else TESTSCRIPTS= @@ -231,3 +300,122 @@ memcheck: ptrcheck: $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check +# tiff2bw is pretty lame so currently only the generated scripts +# tiff2bw-palette-1c-8b.sh, tiff2bw-quad-lzw-compat.sh, and +# tiff2bw-rgb-3c-8b.sh pass tests. +generate-tiff2bw-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiff2bw-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiff2bw-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFF2BW\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + +generate-tiff2rgba-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiff2rgba-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + +# Test rotations +generate-tiffcrop-R90-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + +# Test flip (mirror) +generate-tiffcrop-doubleflip-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + +# Test extracting a section 100 pixels wide and 100 pixels high +generate-tiffcrop-extract-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + +# Test extracting the first and fourth quarters from the left side. +generate-tiffcrop-extractz14-tests: + for file in $(TIFFIMAGES) ; \ + do \ + base=`basename $$file .tiff` ; \ + testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \ + ( \ + echo "#!/bin/sh" ; \ + echo "# Generated file, master is Makefile.am" ; \ + echo ". \$${srcdir:-.}/common.sh" ; \ + echo "infile=\"\$$srcdir/$$file\"" ; \ + echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \ + echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \ + echo "f_tiffinfo_validate \$$outfile" ; \ + ) > $$testscript ; \ + chmod +x $$testscript ; \ + done + +generate-tiffcrop-tests: \ + generate-tiffcrop-R90-tests \ + generate-tiffcrop-doubleflip-tests \ + generate-tiffcrop-extract-tests \ + generate-tiffcrop-extractz14-tests + +generate-tests: \ + generate-tiff2bw-tests \ + generate-tiff2rgba-tests \ + generate-tiffcrop-tests diff --git a/archive/test/fax2tiff.sh b/test/fax2tiff.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/fax2tiff.sh rename to test/fax2tiff.sh diff --git a/archive/test/ppm2tiff_pbm.sh b/test/ppm2tiff_pbm.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/ppm2tiff_pbm.sh rename to test/ppm2tiff_pbm.sh diff --git a/archive/test/ppm2tiff_pgm.sh b/test/ppm2tiff_pgm.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/ppm2tiff_pgm.sh rename to test/ppm2tiff_pgm.sh diff --git a/archive/test/ppm2tiff_ppm.sh b/test/ppm2tiff_ppm.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/ppm2tiff_ppm.sh rename to test/ppm2tiff_ppm.sh diff --git a/archive/test/testdeflatelaststripextradata.sh b/test/testdeflatelaststripextradata.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/testdeflatelaststripextradata.sh rename to test/testdeflatelaststripextradata.sh diff --git a/test/testfax3_bug_513.sh b/test/testfax3_bug_513.sh new file mode 100755 index 00000000..751db960 --- /dev/null +++ b/test/testfax3_bug_513.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# check decoding of a CCITT Group 3 encoded TIFF +# hitting https://gitlab.com/libtiff/libtiff/-/issues/513 +. ${srcdir:-.}/common.sh +infile="${IMAGES}/testfax3_bug_513.tiff" +outfile="o-testfax3_bug_513.tiff" +rm -f $outfile +echo "$MEMCHECK ${TIFFCP} -c none $infile $outfile" +eval "$MEMCHECK ${TIFFCP} -c none $infile $outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "Output (if any) is in \"${outfile}\"." + exit $status +fi +echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "\"${outfile}\" differs from reference file." + exit $status +fi diff --git a/test/testfax4.sh b/test/testfax4.sh new file mode 100755 index 00000000..6f465e8f --- /dev/null +++ b/test/testfax4.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# check decoding of a CCITT Group 4 encoded TIFF +# with 0 length runs +. ${srcdir:-.}/common.sh +infile="${IMAGES}/testfax4.tiff" +outfile="o-testfax4.tiff" +rm -f $outfile +echo "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" +eval "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "Output (if any) is in \"${outfile}\"." + exit $status +fi +echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "\"${outfile}\" differs from reference file." + exit $status +fi diff --git a/archive/test/tiff2bw-logluv-3c-16b.sh b/test/tiff2bw-logluv-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-logluv-3c-16b.sh rename to test/tiff2bw-logluv-3c-16b.sh diff --git a/archive/test/tiff2bw-lzw-single-strip.sh b/test/tiff2bw-lzw-single-strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-lzw-single-strip.sh rename to test/tiff2bw-lzw-single-strip.sh diff --git a/archive/test/tiff2bw-minisblack-1c-16b.sh b/test/tiff2bw-minisblack-1c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-minisblack-1c-16b.sh rename to test/tiff2bw-minisblack-1c-16b.sh diff --git a/archive/test/tiff2bw-minisblack-1c-8b.sh b/test/tiff2bw-minisblack-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-minisblack-1c-8b.sh rename to test/tiff2bw-minisblack-1c-8b.sh diff --git a/archive/test/tiff2bw-minisblack-2c-8b-alpha.sh b/test/tiff2bw-minisblack-2c-8b-alpha.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-minisblack-2c-8b-alpha.sh rename to test/tiff2bw-minisblack-2c-8b-alpha.sh diff --git a/archive/test/tiff2bw-miniswhite-1c-1b.sh b/test/tiff2bw-miniswhite-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-miniswhite-1c-1b.sh rename to test/tiff2bw-miniswhite-1c-1b.sh diff --git a/archive/test/tiff2bw-ojpeg_chewey_subsamp21_multi_strip.sh b/test/tiff2bw-ojpeg_chewey_subsamp21_multi_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-ojpeg_chewey_subsamp21_multi_strip.sh rename to test/tiff2bw-ojpeg_chewey_subsamp21_multi_strip.sh diff --git a/archive/test/tiff2bw-ojpeg_zackthecat_subsamp22_single_strip.sh b/test/tiff2bw-ojpeg_zackthecat_subsamp22_single_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-ojpeg_zackthecat_subsamp22_single_strip.sh rename to test/tiff2bw-ojpeg_zackthecat_subsamp22_single_strip.sh diff --git a/archive/test/tiff2bw-palette-1c-1b.sh b/test/tiff2bw-palette-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-palette-1c-1b.sh rename to test/tiff2bw-palette-1c-1b.sh diff --git a/archive/test/tiff2bw-palette-1c-4b.sh b/test/tiff2bw-palette-1c-4b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-palette-1c-4b.sh rename to test/tiff2bw-palette-1c-4b.sh diff --git a/archive/test/tiff2bw-palette-1c-8b.sh b/test/tiff2bw-palette-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-palette-1c-8b.sh rename to test/tiff2bw-palette-1c-8b.sh diff --git a/archive/test/tiff2bw-quad-lzw-compat.sh b/test/tiff2bw-quad-lzw-compat.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-quad-lzw-compat.sh rename to test/tiff2bw-quad-lzw-compat.sh diff --git a/archive/test/tiff2bw-quad-tile.jpg.sh b/test/tiff2bw-quad-tile.jpg.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-quad-tile.jpg.sh rename to test/tiff2bw-quad-tile.jpg.sh diff --git a/archive/test/tiff2bw-quad-tile.jpg.t1iff.sh b/test/tiff2bw-quad-tile.jpg.t1iff.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-quad-tile.jpg.t1iff.sh rename to test/tiff2bw-quad-tile.jpg.t1iff.sh diff --git a/archive/test/tiff2bw-rgb-3c-16b.sh b/test/tiff2bw-rgb-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-rgb-3c-16b.sh rename to test/tiff2bw-rgb-3c-16b.sh diff --git a/archive/test/tiff2bw-rgb-3c-8b.sh b/test/tiff2bw-rgb-3c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2bw-rgb-3c-8b.sh rename to test/tiff2bw-rgb-3c-8b.sh diff --git a/archive/test/tiff2pdf.sh b/test/tiff2pdf.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2pdf.sh rename to test/tiff2pdf.sh diff --git a/archive/test/tiff2ps-EPS1.sh b/test/tiff2ps-EPS1.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2ps-EPS1.sh rename to test/tiff2ps-EPS1.sh diff --git a/archive/test/tiff2ps-PS1.sh b/test/tiff2ps-PS1.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2ps-PS1.sh rename to test/tiff2ps-PS1.sh diff --git a/archive/test/tiff2ps-PS2.sh b/test/tiff2ps-PS2.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2ps-PS2.sh rename to test/tiff2ps-PS2.sh diff --git a/archive/test/tiff2ps-PS3.sh b/test/tiff2ps-PS3.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2ps-PS3.sh rename to test/tiff2ps-PS3.sh diff --git a/archive/test/tiff2rgba-logluv-3c-16b.sh b/test/tiff2rgba-logluv-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-logluv-3c-16b.sh rename to test/tiff2rgba-logluv-3c-16b.sh diff --git a/archive/test/tiff2rgba-lzw-single-strip.sh b/test/tiff2rgba-lzw-single-strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-lzw-single-strip.sh rename to test/tiff2rgba-lzw-single-strip.sh diff --git a/archive/test/tiff2rgba-minisblack-1c-16b.sh b/test/tiff2rgba-minisblack-1c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-minisblack-1c-16b.sh rename to test/tiff2rgba-minisblack-1c-16b.sh diff --git a/archive/test/tiff2rgba-minisblack-1c-8b.sh b/test/tiff2rgba-minisblack-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-minisblack-1c-8b.sh rename to test/tiff2rgba-minisblack-1c-8b.sh diff --git a/archive/test/tiff2rgba-minisblack-2c-8b-alpha.sh b/test/tiff2rgba-minisblack-2c-8b-alpha.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-minisblack-2c-8b-alpha.sh rename to test/tiff2rgba-minisblack-2c-8b-alpha.sh diff --git a/archive/test/tiff2rgba-miniswhite-1c-1b.sh b/test/tiff2rgba-miniswhite-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-miniswhite-1c-1b.sh rename to test/tiff2rgba-miniswhite-1c-1b.sh diff --git a/archive/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh b/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh rename to test/tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh diff --git a/archive/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh b/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh rename to test/tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh diff --git a/archive/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh b/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh rename to test/tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh diff --git a/archive/test/tiff2rgba-palette-1c-1b.sh b/test/tiff2rgba-palette-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-palette-1c-1b.sh rename to test/tiff2rgba-palette-1c-1b.sh diff --git a/archive/test/tiff2rgba-palette-1c-4b.sh b/test/tiff2rgba-palette-1c-4b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-palette-1c-4b.sh rename to test/tiff2rgba-palette-1c-4b.sh diff --git a/archive/test/tiff2rgba-palette-1c-8b.sh b/test/tiff2rgba-palette-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-palette-1c-8b.sh rename to test/tiff2rgba-palette-1c-8b.sh diff --git a/archive/test/tiff2rgba-quad-lzw-compat.sh b/test/tiff2rgba-quad-lzw-compat.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-quad-lzw-compat.sh rename to test/tiff2rgba-quad-lzw-compat.sh diff --git a/archive/test/tiff2rgba-quad-tile.jpg.sh b/test/tiff2rgba-quad-tile.jpg.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-quad-tile.jpg.sh rename to test/tiff2rgba-quad-tile.jpg.sh diff --git a/archive/test/tiff2rgba-quad-tile.jpg.t1iff.sh b/test/tiff2rgba-quad-tile.jpg.t1iff.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-quad-tile.jpg.t1iff.sh rename to test/tiff2rgba-quad-tile.jpg.t1iff.sh diff --git a/archive/test/tiff2rgba-rgb-3c-16b.sh b/test/tiff2rgba-rgb-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-rgb-3c-16b.sh rename to test/tiff2rgba-rgb-3c-16b.sh diff --git a/archive/test/tiff2rgba-rgb-3c-8b.sh b/test/tiff2rgba-rgb-3c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiff2rgba-rgb-3c-8b.sh rename to test/tiff2rgba-rgb-3c-8b.sh diff --git a/archive/test/tiffcp-thumbnail.sh b/test/tiffcp-thumbnail.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcp-thumbnail.sh rename to test/tiffcp-thumbnail.sh diff --git a/archive/test/tiffcrop-R90-logluv-3c-16b.sh b/test/tiffcrop-R90-logluv-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-logluv-3c-16b.sh rename to test/tiffcrop-R90-logluv-3c-16b.sh diff --git a/archive/test/tiffcrop-R90-lzw-single-strip.sh b/test/tiffcrop-R90-lzw-single-strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-lzw-single-strip.sh rename to test/tiffcrop-R90-lzw-single-strip.sh diff --git a/archive/test/tiffcrop-R90-minisblack-1c-16b.sh b/test/tiffcrop-R90-minisblack-1c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-minisblack-1c-16b.sh rename to test/tiffcrop-R90-minisblack-1c-16b.sh diff --git a/archive/test/tiffcrop-R90-minisblack-1c-8b.sh b/test/tiffcrop-R90-minisblack-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-minisblack-1c-8b.sh rename to test/tiffcrop-R90-minisblack-1c-8b.sh diff --git a/archive/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh b/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh rename to test/tiffcrop-R90-minisblack-2c-8b-alpha.sh diff --git a/archive/test/tiffcrop-R90-miniswhite-1c-1b.sh b/test/tiffcrop-R90-miniswhite-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-miniswhite-1c-1b.sh rename to test/tiffcrop-R90-miniswhite-1c-1b.sh diff --git a/archive/test/tiffcrop-R90-ojpeg_chewey_subsamp21_multi_strip.sh b/test/tiffcrop-R90-ojpeg_chewey_subsamp21_multi_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-ojpeg_chewey_subsamp21_multi_strip.sh rename to test/tiffcrop-R90-ojpeg_chewey_subsamp21_multi_strip.sh diff --git a/archive/test/tiffcrop-R90-ojpeg_zackthecat_subsamp22_single_strip.sh b/test/tiffcrop-R90-ojpeg_zackthecat_subsamp22_single_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-ojpeg_zackthecat_subsamp22_single_strip.sh rename to test/tiffcrop-R90-ojpeg_zackthecat_subsamp22_single_strip.sh diff --git a/archive/test/tiffcrop-R90-palette-1c-1b.sh b/test/tiffcrop-R90-palette-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-palette-1c-1b.sh rename to test/tiffcrop-R90-palette-1c-1b.sh diff --git a/archive/test/tiffcrop-R90-palette-1c-4b.sh b/test/tiffcrop-R90-palette-1c-4b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-palette-1c-4b.sh rename to test/tiffcrop-R90-palette-1c-4b.sh diff --git a/archive/test/tiffcrop-R90-palette-1c-8b.sh b/test/tiffcrop-R90-palette-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-palette-1c-8b.sh rename to test/tiffcrop-R90-palette-1c-8b.sh diff --git a/archive/test/tiffcrop-R90-quad-lzw-compat.sh b/test/tiffcrop-R90-quad-lzw-compat.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-quad-lzw-compat.sh rename to test/tiffcrop-R90-quad-lzw-compat.sh diff --git a/archive/test/tiffcrop-R90-quad-tile.jpg.sh b/test/tiffcrop-R90-quad-tile.jpg.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-quad-tile.jpg.sh rename to test/tiffcrop-R90-quad-tile.jpg.sh diff --git a/archive/test/tiffcrop-R90-quad-tile.jpg.t1iff.sh b/test/tiffcrop-R90-quad-tile.jpg.t1iff.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-quad-tile.jpg.t1iff.sh rename to test/tiffcrop-R90-quad-tile.jpg.t1iff.sh diff --git a/archive/test/tiffcrop-R90-rgb-3c-16b.sh b/test/tiffcrop-R90-rgb-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-rgb-3c-16b.sh rename to test/tiffcrop-R90-rgb-3c-16b.sh diff --git a/archive/test/tiffcrop-R90-rgb-3c-8b.sh b/test/tiffcrop-R90-rgb-3c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-R90-rgb-3c-8b.sh rename to test/tiffcrop-R90-rgb-3c-8b.sh diff --git a/archive/test/tiffcrop-doubleflip-logluv-3c-16b.sh b/test/tiffcrop-doubleflip-logluv-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-logluv-3c-16b.sh rename to test/tiffcrop-doubleflip-logluv-3c-16b.sh diff --git a/archive/test/tiffcrop-doubleflip-lzw-single-strip.sh b/test/tiffcrop-doubleflip-lzw-single-strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-lzw-single-strip.sh rename to test/tiffcrop-doubleflip-lzw-single-strip.sh diff --git a/archive/test/tiffcrop-doubleflip-minisblack-1c-16b.sh b/test/tiffcrop-doubleflip-minisblack-1c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-minisblack-1c-16b.sh rename to test/tiffcrop-doubleflip-minisblack-1c-16b.sh diff --git a/archive/test/tiffcrop-doubleflip-minisblack-1c-8b.sh b/test/tiffcrop-doubleflip-minisblack-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-minisblack-1c-8b.sh rename to test/tiffcrop-doubleflip-minisblack-1c-8b.sh diff --git a/archive/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh b/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh rename to test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh diff --git a/archive/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh b/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh rename to test/tiffcrop-doubleflip-miniswhite-1c-1b.sh diff --git a/archive/test/tiffcrop-doubleflip-ojpeg_chewey_subsamp21_multi_strip.sh b/test/tiffcrop-doubleflip-ojpeg_chewey_subsamp21_multi_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-ojpeg_chewey_subsamp21_multi_strip.sh rename to test/tiffcrop-doubleflip-ojpeg_chewey_subsamp21_multi_strip.sh diff --git a/archive/test/tiffcrop-doubleflip-ojpeg_zackthecat_subsamp22_single_strip.sh b/test/tiffcrop-doubleflip-ojpeg_zackthecat_subsamp22_single_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-ojpeg_zackthecat_subsamp22_single_strip.sh rename to test/tiffcrop-doubleflip-ojpeg_zackthecat_subsamp22_single_strip.sh diff --git a/archive/test/tiffcrop-doubleflip-palette-1c-1b.sh b/test/tiffcrop-doubleflip-palette-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-palette-1c-1b.sh rename to test/tiffcrop-doubleflip-palette-1c-1b.sh diff --git a/archive/test/tiffcrop-doubleflip-palette-1c-4b.sh b/test/tiffcrop-doubleflip-palette-1c-4b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-palette-1c-4b.sh rename to test/tiffcrop-doubleflip-palette-1c-4b.sh diff --git a/archive/test/tiffcrop-doubleflip-palette-1c-8b.sh b/test/tiffcrop-doubleflip-palette-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-palette-1c-8b.sh rename to test/tiffcrop-doubleflip-palette-1c-8b.sh diff --git a/archive/test/tiffcrop-doubleflip-quad-lzw-compat.sh b/test/tiffcrop-doubleflip-quad-lzw-compat.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-quad-lzw-compat.sh rename to test/tiffcrop-doubleflip-quad-lzw-compat.sh diff --git a/archive/test/tiffcrop-doubleflip-quad-tile.jpg.sh b/test/tiffcrop-doubleflip-quad-tile.jpg.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-quad-tile.jpg.sh rename to test/tiffcrop-doubleflip-quad-tile.jpg.sh diff --git a/archive/test/tiffcrop-doubleflip-quad-tile.jpg.t1iff.sh b/test/tiffcrop-doubleflip-quad-tile.jpg.t1iff.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-quad-tile.jpg.t1iff.sh rename to test/tiffcrop-doubleflip-quad-tile.jpg.t1iff.sh diff --git a/archive/test/tiffcrop-doubleflip-rgb-3c-16b.sh b/test/tiffcrop-doubleflip-rgb-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-rgb-3c-16b.sh rename to test/tiffcrop-doubleflip-rgb-3c-16b.sh diff --git a/archive/test/tiffcrop-doubleflip-rgb-3c-8b.sh b/test/tiffcrop-doubleflip-rgb-3c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-doubleflip-rgb-3c-8b.sh rename to test/tiffcrop-doubleflip-rgb-3c-8b.sh diff --git a/archive/test/tiffcrop-extract-logluv-3c-16b.sh b/test/tiffcrop-extract-logluv-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-logluv-3c-16b.sh rename to test/tiffcrop-extract-logluv-3c-16b.sh diff --git a/archive/test/tiffcrop-extract-lzw-single-strip.sh b/test/tiffcrop-extract-lzw-single-strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-lzw-single-strip.sh rename to test/tiffcrop-extract-lzw-single-strip.sh diff --git a/archive/test/tiffcrop-extract-minisblack-1c-16b.sh b/test/tiffcrop-extract-minisblack-1c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-minisblack-1c-16b.sh rename to test/tiffcrop-extract-minisblack-1c-16b.sh diff --git a/archive/test/tiffcrop-extract-minisblack-1c-8b.sh b/test/tiffcrop-extract-minisblack-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-minisblack-1c-8b.sh rename to test/tiffcrop-extract-minisblack-1c-8b.sh diff --git a/archive/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh b/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh rename to test/tiffcrop-extract-minisblack-2c-8b-alpha.sh diff --git a/archive/test/tiffcrop-extract-miniswhite-1c-1b.sh b/test/tiffcrop-extract-miniswhite-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-miniswhite-1c-1b.sh rename to test/tiffcrop-extract-miniswhite-1c-1b.sh diff --git a/archive/test/tiffcrop-extract-ojpeg_chewey_subsamp21_multi_strip.sh b/test/tiffcrop-extract-ojpeg_chewey_subsamp21_multi_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-ojpeg_chewey_subsamp21_multi_strip.sh rename to test/tiffcrop-extract-ojpeg_chewey_subsamp21_multi_strip.sh diff --git a/archive/test/tiffcrop-extract-ojpeg_zackthecat_subsamp22_single_strip.sh b/test/tiffcrop-extract-ojpeg_zackthecat_subsamp22_single_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-ojpeg_zackthecat_subsamp22_single_strip.sh rename to test/tiffcrop-extract-ojpeg_zackthecat_subsamp22_single_strip.sh diff --git a/archive/test/tiffcrop-extract-palette-1c-1b.sh b/test/tiffcrop-extract-palette-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-palette-1c-1b.sh rename to test/tiffcrop-extract-palette-1c-1b.sh diff --git a/archive/test/tiffcrop-extract-palette-1c-4b.sh b/test/tiffcrop-extract-palette-1c-4b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-palette-1c-4b.sh rename to test/tiffcrop-extract-palette-1c-4b.sh diff --git a/archive/test/tiffcrop-extract-palette-1c-8b.sh b/test/tiffcrop-extract-palette-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-palette-1c-8b.sh rename to test/tiffcrop-extract-palette-1c-8b.sh diff --git a/archive/test/tiffcrop-extract-quad-lzw-compat.sh b/test/tiffcrop-extract-quad-lzw-compat.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-quad-lzw-compat.sh rename to test/tiffcrop-extract-quad-lzw-compat.sh diff --git a/archive/test/tiffcrop-extract-quad-tile.jpg.sh b/test/tiffcrop-extract-quad-tile.jpg.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-quad-tile.jpg.sh rename to test/tiffcrop-extract-quad-tile.jpg.sh diff --git a/archive/test/tiffcrop-extract-quad-tile.jpg.t1iff.sh b/test/tiffcrop-extract-quad-tile.jpg.t1iff.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-quad-tile.jpg.t1iff.sh rename to test/tiffcrop-extract-quad-tile.jpg.t1iff.sh diff --git a/archive/test/tiffcrop-extract-rgb-3c-16b.sh b/test/tiffcrop-extract-rgb-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-rgb-3c-16b.sh rename to test/tiffcrop-extract-rgb-3c-16b.sh diff --git a/archive/test/tiffcrop-extract-rgb-3c-8b.sh b/test/tiffcrop-extract-rgb-3c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extract-rgb-3c-8b.sh rename to test/tiffcrop-extract-rgb-3c-8b.sh diff --git a/archive/test/tiffcrop-extractz14-logluv-3c-16b.sh b/test/tiffcrop-extractz14-logluv-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-logluv-3c-16b.sh rename to test/tiffcrop-extractz14-logluv-3c-16b.sh diff --git a/archive/test/tiffcrop-extractz14-lzw-single-strip.sh b/test/tiffcrop-extractz14-lzw-single-strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-lzw-single-strip.sh rename to test/tiffcrop-extractz14-lzw-single-strip.sh diff --git a/archive/test/tiffcrop-extractz14-minisblack-1c-16b.sh b/test/tiffcrop-extractz14-minisblack-1c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-minisblack-1c-16b.sh rename to test/tiffcrop-extractz14-minisblack-1c-16b.sh diff --git a/archive/test/tiffcrop-extractz14-minisblack-1c-8b.sh b/test/tiffcrop-extractz14-minisblack-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-minisblack-1c-8b.sh rename to test/tiffcrop-extractz14-minisblack-1c-8b.sh diff --git a/archive/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh b/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh rename to test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh diff --git a/archive/test/tiffcrop-extractz14-miniswhite-1c-1b.sh b/test/tiffcrop-extractz14-miniswhite-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-miniswhite-1c-1b.sh rename to test/tiffcrop-extractz14-miniswhite-1c-1b.sh diff --git a/archive/test/tiffcrop-extractz14-ojpeg_chewey_subsamp21_multi_strip.sh b/test/tiffcrop-extractz14-ojpeg_chewey_subsamp21_multi_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-ojpeg_chewey_subsamp21_multi_strip.sh rename to test/tiffcrop-extractz14-ojpeg_chewey_subsamp21_multi_strip.sh diff --git a/archive/test/tiffcrop-extractz14-ojpeg_zackthecat_subsamp22_single_strip.sh b/test/tiffcrop-extractz14-ojpeg_zackthecat_subsamp22_single_strip.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-ojpeg_zackthecat_subsamp22_single_strip.sh rename to test/tiffcrop-extractz14-ojpeg_zackthecat_subsamp22_single_strip.sh diff --git a/archive/test/tiffcrop-extractz14-palette-1c-1b.sh b/test/tiffcrop-extractz14-palette-1c-1b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-palette-1c-1b.sh rename to test/tiffcrop-extractz14-palette-1c-1b.sh diff --git a/archive/test/tiffcrop-extractz14-palette-1c-4b.sh b/test/tiffcrop-extractz14-palette-1c-4b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-palette-1c-4b.sh rename to test/tiffcrop-extractz14-palette-1c-4b.sh diff --git a/archive/test/tiffcrop-extractz14-palette-1c-8b.sh b/test/tiffcrop-extractz14-palette-1c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-palette-1c-8b.sh rename to test/tiffcrop-extractz14-palette-1c-8b.sh diff --git a/archive/test/tiffcrop-extractz14-quad-lzw-compat.sh b/test/tiffcrop-extractz14-quad-lzw-compat.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-quad-lzw-compat.sh rename to test/tiffcrop-extractz14-quad-lzw-compat.sh diff --git a/archive/test/tiffcrop-extractz14-quad-tile.jpg.sh b/test/tiffcrop-extractz14-quad-tile.jpg.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-quad-tile.jpg.sh rename to test/tiffcrop-extractz14-quad-tile.jpg.sh diff --git a/archive/test/tiffcrop-extractz14-quad-tile.jpg.t1iff.sh b/test/tiffcrop-extractz14-quad-tile.jpg.t1iff.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-quad-tile.jpg.t1iff.sh rename to test/tiffcrop-extractz14-quad-tile.jpg.t1iff.sh diff --git a/archive/test/tiffcrop-extractz14-rgb-3c-16b.sh b/test/tiffcrop-extractz14-rgb-3c-16b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-rgb-3c-16b.sh rename to test/tiffcrop-extractz14-rgb-3c-16b.sh diff --git a/archive/test/tiffcrop-extractz14-rgb-3c-8b.sh b/test/tiffcrop-extractz14-rgb-3c-8b.sh old mode 100644 new mode 100755 similarity index 100% rename from archive/test/tiffcrop-extractz14-rgb-3c-8b.sh rename to test/tiffcrop-extractz14-rgb-3c-8b.sh diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index dab13a58..1f0fea97 100755 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -30,10 +30,66 @@ if (WIN32) endif () +add_executable(fax2ps ../placeholder.h) +target_sources(fax2ps PRIVATE fax2ps.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(fax2ps PRIVATE tiff tiff_port) + +add_executable(fax2tiff ../placeholder.h) +target_sources(fax2tiff PRIVATE fax2tiff.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(fax2tiff PRIVATE tiff tiff_port) + +add_executable(pal2rgb ../placeholder.h) +target_sources(pal2rgb PRIVATE pal2rgb.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(pal2rgb PRIVATE tiff tiff_port) + +add_executable(ppm2tiff ../placeholder.h) +target_sources(ppm2tiff PRIVATE ppm2tiff.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(ppm2tiff PRIVATE tiff tiff_port) + +add_executable(raw2tiff ../placeholder.h) +target_sources(raw2tiff PRIVATE raw2tiff.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(raw2tiff PRIVATE tiff tiff_port CMath::CMath) + +add_executable(rgb2ycbcr ../placeholder.h) +target_sources(rgb2ycbcr PRIVATE rgb2ycbcr.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(rgb2ycbcr PRIVATE tiff tiff_port) + +add_executable(thumbnail ../placeholder.h) +target_sources(thumbnail PRIVATE thumbnail.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(thumbnail PRIVATE tiff tiff_port CMath::CMath) + +add_executable(tiff2bw ../placeholder.h) +target_sources(tiff2bw PRIVATE tiff2bw.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiff2bw PRIVATE tiff tiff_port) + +add_executable(tiff2pdf ../placeholder.h) +target_sources(tiff2pdf PRIVATE tiff2pdf.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiff2pdf PRIVATE tiff tiff_port) + +add_executable(tiff2ps ../placeholder.h) +target_sources(tiff2ps PRIVATE tiff2ps.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiff2ps PRIVATE tiff tiff_port CMath::CMath) + +add_executable(tiff2rgba ../placeholder.h) +target_sources(tiff2rgba PRIVATE tiff2rgba.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiff2rgba PRIVATE tiff tiff_port) + +add_executable(tiffcmp ../placeholder.h) +target_sources(tiffcmp PRIVATE tiffcmp.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiffcmp PRIVATE tiff tiff_port) + add_executable(tiffcp ../placeholder.h) target_sources(tiffcp PRIVATE tiffcp.c ${MSVC_RESOURCE_FILE}) target_link_libraries(tiffcp PRIVATE tiff tiff_port) +add_executable(tiffcrop ../placeholder.h) +target_sources(tiffcrop PRIVATE tiffcrop.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiffcrop PRIVATE tiff tiff_port CMath::CMath) + +add_executable(tiffdither ../placeholder.h) +target_sources(tiffdither PRIVATE tiffdither.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiffdither PRIVATE tiff tiff_port) + add_executable(tiffdump ../placeholder.h) target_sources(tiffdump PRIVATE tiffdump.c ${MSVC_RESOURCE_FILE}) target_link_libraries(tiffdump PRIVATE tiff tiff_port) @@ -42,6 +98,10 @@ add_executable(tiffinfo ../placeholder.h) target_sources(tiffinfo PRIVATE tiffinfo.c ${MSVC_RESOURCE_FILE}) target_link_libraries(tiffinfo PRIVATE tiff tiff_port) +add_executable(tiffmedian ../placeholder.h) +target_sources(tiffmedian PRIVATE tiffmedian.c ${MSVC_RESSOURCE_FILE}) +target_link_libraries(tiffmedian PRIVATE tiff tiff_port) + add_executable(tiffset ../placeholder.h) target_sources(tiffset PRIVATE tiffset.c ${MSVC_RESOURCE_FILE}) target_link_libraries(tiffset PRIVATE tiff tiff_port) @@ -52,19 +112,57 @@ target_link_libraries(tiffsplit PRIVATE tiff tiff_port) # rgb2ycbcr and thumbnail are intended to *NOT* be installed. They are for # testing purposes only. -install(TARGETS tiffcp +install(TARGETS fax2ps + fax2tiff + pal2rgb + ppm2tiff + raw2tiff + tiff2bw + tiff2pdf + tiff2ps + tiff2rgba + tiffcmp + tiffcp + tiffcrop + tiffdither tiffdump tiffinfo + tiffmedian tiffset tiffsplit RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +if(OPENGL_SUPPORT) + add_executable(tiffgt ../placeholder.h) + target_sources(tiffgt PRIVATE tiffgt.c) + target_link_libraries(tiffgt PRIVATE tiff tiff_port) + target_link_libraries(tiffgt PRIVATE OpenGL::GL GLUT::GLUT) + + install(TARGETS tiffgt + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +endif() + if(WEBP_SUPPORT AND EMSCRIPTEN) # Emscripten is pretty finnicky about linker flags. # It needs --shared-memory if and only if atomics or bulk-memory is used. - foreach(target tiffcp + foreach(target fax2ps + fax2tiff + pal2rgb + ppm2tiff + raw2tiff + rgb2ycbcr + thumbnail + tiff2bw + tiff2pdf + tiff2ps + tiff2rgba + tiffcmp + tiffcp + tiffcrop + tiffdither tiffdump tiffinfo + tiffmedian tiffset tiffsplit) target_link_options(${target} PUBLIC "-Wl,--shared-memory") diff --git a/tools/Makefile.am b/tools/Makefile.am index 24ccef88..877ffb26 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -32,33 +32,111 @@ EXTRA_DIST = \ if TIFF_TOOLS bin_PROGRAMS = \ + fax2ps \ + fax2tiff \ + pal2rgb \ + ppm2tiff \ + raw2tiff \ + tiff2bw \ + tiff2pdf \ + tiff2ps \ + tiff2rgba \ + tiffcmp \ tiffcp \ + tiffcrop \ + tiffdither \ tiffdump \ tiffinfo \ + tiffmedian \ tiffset \ tiffsplit +if HAVE_OPENGL +bin_PROGRAMS += tiffgt +endif +endif + +EXTRA_PROGRAMS = rgb2ycbcr thumbnail + +# Executable programs which need to be built in order to support tests +if TIFF_TESTS +check_PROGRAMS = \ + rgb2ycbcr \ + thumbnail endif if HAVE_RPATH AM_LDFLAGS = $(LIBDIR) endif +fax2ps_SOURCES = fax2ps.c +fax2ps_LDADD = $(LIBTIFF) $(LIBPORT) + +fax2tiff_SOURCES = fax2tiff.c +fax2tiff_LDADD = $(LIBTIFF) $(LIBPORT) + +pal2rgb_SOURCES = pal2rgb.c +pal2rgb_LDADD = $(LIBTIFF) $(LIBPORT) + +ppm2tiff_SOURCES = ppm2tiff.c +ppm2tiff_LDADD = $(LIBTIFF) $(LIBPORT) + +raw2tiff_SOURCES = raw2tiff.c +raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT) + +rgb2ycbcr_SOURCES = rgb2ycbcr.c +rgb2ycbcr_LDADD = $(LIBTIFF) $(LIBPORT) + +thumbnail_SOURCES = thumbnail.c +thumbnail_LDADD = $(LIBTIFF) $(LIBPORT) + +tiff2bw_SOURCES = tiff2bw.c +tiff2bw_LDADD = $(LIBTIFF) $(LIBPORT) + +tiff2pdf_SOURCES = tiff2pdf.c +tiff2pdf_LDADD = $(LIBTIFF) $(LIBPORT) + +tiff2ps_SOURCES = tiff2ps.c +tiff2ps_LDADD = $(LIBTIFF) $(LIBPORT) + +tiff2rgba_SOURCES = tiff2rgba.c +tiff2rgba_LDADD = $(LIBTIFF) $(LIBPORT) + +tiffcmp_SOURCES = tiffcmp.c +tiffcmp_LDADD = $(LIBTIFF) $(LIBPORT) + tiffcp_SOURCES = tiffcp.c tiffcp_LDADD = $(LIBTIFF) $(LIBPORT) +tiffcrop_SOURCES = tiffcrop.c +tiffcrop_LDADD = $(LIBTIFF) $(LIBPORT) + +tiffdither_SOURCES = tiffdither.c +tiffdither_LDADD = $(LIBTIFF) $(LIBPORT) + tiffdump_SOURCES = tiffdump.c tiffdump_LDADD = $(LIBTIFF) $(LIBPORT) tiffinfo_SOURCES = tiffinfo.c tiffinfo_LDADD = $(LIBTIFF) $(LIBPORT) +tiffmedian_SOURCES = tiffmedian.c +tiffmedian_LDADD = $(LIBTIFF) $(LIBPORT) + tiffset_SOURCES = tiffset.c tiffset_LDADD = $(LIBTIFF) $(LIBPORT) tiffsplit_SOURCES = tiffsplit.c tiffsplit_LDADD = $(LIBTIFF) $(LIBPORT) +tiffgt_SOURCES = tiffgt.c +tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS) +tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS) + AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port echo: (echo $(CFLAGS)) + (echo $(tiffgt_CFLAGS)) + (echo $(GL_CFLAGS)) + (echo $(GLU_CFLAGS)) + (echo $(GLUT_CFLAGS)) diff --git a/archive/tools/fax2ps.c b/tools/fax2ps.c similarity index 100% rename from archive/tools/fax2ps.c rename to tools/fax2ps.c diff --git a/archive/tools/fax2tiff.c b/tools/fax2tiff.c similarity index 100% rename from archive/tools/fax2tiff.c rename to tools/fax2tiff.c diff --git a/archive/tools/pal2rgb.c b/tools/pal2rgb.c similarity index 100% rename from archive/tools/pal2rgb.c rename to tools/pal2rgb.c diff --git a/archive/tools/ppm2tiff.c b/tools/ppm2tiff.c similarity index 100% rename from archive/tools/ppm2tiff.c rename to tools/ppm2tiff.c diff --git a/archive/tools/raw2tiff.c b/tools/raw2tiff.c similarity index 100% rename from archive/tools/raw2tiff.c rename to tools/raw2tiff.c diff --git a/archive/tools/rgb2ycbcr.c b/tools/rgb2ycbcr.c similarity index 100% rename from archive/tools/rgb2ycbcr.c rename to tools/rgb2ycbcr.c diff --git a/archive/tools/thumbnail.c b/tools/thumbnail.c similarity index 100% rename from archive/tools/thumbnail.c rename to tools/thumbnail.c diff --git a/archive/tools/tiff2bw.c b/tools/tiff2bw.c similarity index 100% rename from archive/tools/tiff2bw.c rename to tools/tiff2bw.c diff --git a/tools/unsupported/tiff2pdf.c b/tools/tiff2pdf.c similarity index 100% rename from tools/unsupported/tiff2pdf.c rename to tools/tiff2pdf.c diff --git a/tools/unsupported/tiff2ps.c b/tools/tiff2ps.c similarity index 100% rename from tools/unsupported/tiff2ps.c rename to tools/tiff2ps.c diff --git a/archive/tools/tiff2rgba.c b/tools/tiff2rgba.c similarity index 100% rename from archive/tools/tiff2rgba.c rename to tools/tiff2rgba.c diff --git a/archive/tools/tiffcmp.c b/tools/tiffcmp.c similarity index 100% rename from archive/tools/tiffcmp.c rename to tools/tiffcmp.c diff --git a/archive/tools/tiffcrop.c b/tools/tiffcrop.c similarity index 100% rename from archive/tools/tiffcrop.c rename to tools/tiffcrop.c diff --git a/archive/tools/tiffdither.c b/tools/tiffdither.c similarity index 100% rename from archive/tools/tiffdither.c rename to tools/tiffdither.c diff --git a/archive/tools/tiffgt.c b/tools/tiffgt.c similarity index 100% rename from archive/tools/tiffgt.c rename to tools/tiffgt.c diff --git a/archive/tools/tiffmedian.c b/tools/tiffmedian.c similarity index 100% rename from archive/tools/tiffmedian.c rename to tools/tiffmedian.c diff --git a/tools/unsupported/CMakeLists.txt b/tools/unsupported/CMakeLists.txt deleted file mode 100644 index 8a2843ff..00000000 --- a/tools/unsupported/CMakeLists.txt +++ /dev/null @@ -1,56 +0,0 @@ -# CMake build for libtiff -# -# Copyright © 2015 Open Microscopy Environment / University of Dundee -# Written by Roger Leigh -# -# Permission to use, copy, modify, distribute, and sell this software and -# its documentation for any purpose is hereby granted without fee, provided -# that (i) the above copyright notices and this permission notice appear in -# all copies of the software and related documentation, and (ii) the names of -# Sam Leffler and Silicon Graphics may not be used in any advertising or -# publicity relating to the software without the specific, prior written -# permission of Sam Leffler and Silicon Graphics. -# -# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -# -# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR -# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, -# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF -# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. - -message(STATUS "==== Tools - Unsupported =========") - -# Windows specific resource preparation -if (WIN32) - message(STATUS "Include resource version information for TOOLS-UNSUPPORTED") - set(MSVC_RESOURCE_FILE tif_tools-unsupported_versioninfo.rc) - source_group("Resource Files" FILES tif_tools-unsupported_versioninfo.rc) -endif () - - -add_executable(tiff2pdf ../../placeholder.h) -target_sources(tiff2pdf PRIVATE tiff2pdf.c ${MSVC_RESOURCE_FILE}) -target_link_libraries(tiff2pdf PRIVATE tiff tiff_port) - -add_executable(tiff2ps ../../placeholder.h) -target_sources(tiff2ps PRIVATE tiff2ps.c ${MSVC_RESOURCE_FILE}) -target_link_libraries(tiff2ps PRIVATE tiff tiff_port CMath::CMath) - -# rgb2ycbcr and thumbnail are intended to *NOT* be installed. They are for -# testing purposes only. -install(TARGETS tiff2pdf - tiff2ps - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/unsupported") - -if(WEBP_SUPPORT AND EMSCRIPTEN) - # Emscripten is pretty finnicky about linker flags. - # It needs --shared-memory if and only if atomics or bulk-memory is used. - foreach(target tiff2pdf - tiff2ps) - target_link_options(${target} PUBLIC "-Wl,--shared-memory") - endforeach() -endif() diff --git a/tools/unsupported/tif_tools-unsupported_versioninfo.rc b/tools/unsupported/tif_tools-unsupported_versioninfo.rc deleted file mode 100644 index a0466b38..00000000 --- a/tools/unsupported/tif_tools-unsupported_versioninfo.rc +++ /dev/null @@ -1,50 +0,0 @@ - -/* clang-format off */ - -#define APSTUDIO_HIDDEN_SYMBOLS -#include -#undef APSTUDIO_HIDDEN_SYMBOLS -#include - -#include "tiffvers.h" - -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -VS_VERSION_INFO VERSIONINFO - FILEVERSION TIFFLIB_MAJOR_VERSION,TIFFLIB_MINOR_VERSION,TIFFLIB_MICRO_VERSION,0 - PRODUCTVERSION TIFFLIB_MAJOR_VERSION,TIFFLIB_MINOR_VERSION,TIFFLIB_MICRO_VERSION,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", "libtiff project" - VALUE "FileDescription", "Unsupported TIFF Tools" - VALUE "FileVersion", TIFFLIB_VERSION_STR_MAJ_MIN_MIC - VALUE "InternalName", "" - VALUE "LegalCopyright", "See LICENCE.md" - VALUE "OriginalFilename", "" - VALUE "ProductName", "LibTIFF" - VALUE "ProductVersion", TIFFLIB_VERSION_STR_MAJ_MIN_MIC - VALUE "WebPage", "https://libtiff.gitlab.io/libtiff/\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -