summaryrefslogtreecommitdiff
path: root/tiff/man
diff options
context:
space:
mode:
Diffstat (limited to 'tiff/man')
-rw-r--r--tiff/man/Makefile.am92
-rw-r--r--tiff/man/Makefile.in602
-rw-r--r--tiff/man/TIFFClose.3tiff53
-rw-r--r--tiff/man/TIFFDataWidth.3tiff74
-rw-r--r--tiff/man/TIFFError.3tiff69
-rw-r--r--tiff/man/TIFFFlush.3tiff64
-rw-r--r--tiff/man/TIFFGetField.3tiff232
-rw-r--r--tiff/man/TIFFOpen.3tiff279
-rw-r--r--tiff/man/TIFFPrintDirectory.3tiff70
-rw-r--r--tiff/man/TIFFRGBAImage.3tiff286
-rw-r--r--tiff/man/TIFFReadDirectory.3tiff164
-rw-r--r--tiff/man/TIFFReadEncodedStrip.3tiff78
-rw-r--r--tiff/man/TIFFReadEncodedTile.3tiff76
-rw-r--r--tiff/man/TIFFReadRGBAImage.3tiff218
-rw-r--r--tiff/man/TIFFReadRGBAStrip.3tiff170
-rw-r--r--tiff/man/TIFFReadRGBATile.3tiff171
-rw-r--r--tiff/man/TIFFReadRawStrip.3tiff64
-rw-r--r--tiff/man/TIFFReadRawTile.3tiff65
-rw-r--r--tiff/man/TIFFReadScanline.3tiff94
-rw-r--r--tiff/man/TIFFReadTile.3tiff84
-rw-r--r--tiff/man/TIFFSetDirectory.3tiff79
-rw-r--r--tiff/man/TIFFSetField.3tiff217
-rw-r--r--tiff/man/TIFFWarning.3tiff70
-rw-r--r--tiff/man/TIFFWriteDirectory.3tiff138
-rw-r--r--tiff/man/TIFFWriteEncodedStrip.3tiff102
-rw-r--r--tiff/man/TIFFWriteEncodedTile.3tiff96
-rw-r--r--tiff/man/TIFFWriteRawStrip.3tiff96
-rw-r--r--tiff/man/TIFFWriteRawTile.3tiff84
-rw-r--r--tiff/man/TIFFWriteScanline.3tiff154
-rw-r--r--tiff/man/TIFFWriteTile.3tiff77
-rw-r--r--tiff/man/TIFFbuffer.3tiff77
-rw-r--r--tiff/man/TIFFcodec.3tiff82
-rw-r--r--tiff/man/TIFFcolor.3tiff268
-rw-r--r--tiff/man/TIFFmemory.3tiff90
-rw-r--r--tiff/man/TIFFquery.3tiff142
-rw-r--r--tiff/man/TIFFsize.3tiff59
-rw-r--r--tiff/man/TIFFstrip.3tiff99
-rw-r--r--tiff/man/TIFFswab.3tiff80
-rw-r--r--tiff/man/TIFFtile.3tiff131
-rw-r--r--tiff/man/bmp2tiff.185
-rw-r--r--tiff/man/fax2ps.1159
-rw-r--r--tiff/man/fax2tiff.1286
-rw-r--r--tiff/man/gif2tiff.181
-rw-r--r--tiff/man/libtiff.3tiff536
-rw-r--r--tiff/man/pal2rgb.1111
-rw-r--r--tiff/man/ppm2tiff.1105
-rw-r--r--tiff/man/ras2tiff.196
-rw-r--r--tiff/man/raw2tiff.1196
-rw-r--r--tiff/man/rgb2ycbcr.199
-rw-r--r--tiff/man/sgi2tiff.193
-rw-r--r--tiff/man/thumbnail.190
-rw-r--r--tiff/man/tiff2bw.194
-rw-r--r--tiff/man/tiff2pdf.1251
-rw-r--r--tiff/man/tiff2ps.1268
-rw-r--r--tiff/man/tiff2rgba.197
-rw-r--r--tiff/man/tiffcmp.187
-rw-r--r--tiff/man/tiffcp.1291
-rw-r--r--tiff/man/tiffcrop.1571
-rw-r--r--tiff/man/tiffdither.1132
-rw-r--r--tiff/man/tiffdump.181
-rw-r--r--tiff/man/tiffgt.1245
-rw-r--r--tiff/man/tiffinfo.188
-rw-r--r--tiff/man/tiffmedian.1112
-rw-r--r--tiff/man/tiffset.182
-rw-r--r--tiff/man/tiffsplit.169
-rw-r--r--tiff/man/tiffsv.1142
66 files changed, 9693 insertions, 0 deletions
diff --git a/tiff/man/Makefile.am b/tiff/man/Makefile.am
new file mode 100644
index 0000000..745912b
--- /dev/null
+++ b/tiff/man/Makefile.am
@@ -0,0 +1,92 @@
+# Tag Image File Format (TIFF) Software
+#
+# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+#
+# 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.
+
+# Process this file with automake to produce Makefile.in.
+
+dist_man1_MANS = \
+ bmp2tiff.1 \
+ fax2ps.1 \
+ fax2tiff.1 \
+ gif2tiff.1 \
+ pal2rgb.1 \
+ ppm2tiff.1 \
+ ras2tiff.1 \
+ raw2tiff.1 \
+ rgb2ycbcr.1 \
+ sgi2tiff.1 \
+ thumbnail.1 \
+ tiff2bw.1 \
+ tiff2pdf.1 \
+ tiff2ps.1 \
+ tiff2rgba.1 \
+ tiffcmp.1 \
+ tiffcp.1 \
+ tiffcrop.1 \
+ tiffdither.1 \
+ tiffdump.1 \
+ tiffgt.1 \
+ tiffinfo.1 \
+ tiffmedian.1 \
+ tiffset.1 \
+ tiffsplit.1 \
+ tiffsv.1
+
+dist_man3_MANS = \
+ libtiff.3tiff \
+ TIFFbuffer.3tiff \
+ TIFFClose.3tiff \
+ TIFFcodec.3tiff \
+ TIFFcolor.3tiff \
+ TIFFDataWidth.3tiff \
+ TIFFError.3tiff \
+ TIFFFlush.3tiff \
+ TIFFGetField.3tiff \
+ TIFFmemory.3tiff \
+ TIFFOpen.3tiff \
+ TIFFPrintDirectory.3tiff \
+ TIFFquery.3tiff \
+ TIFFReadDirectory.3tiff \
+ TIFFReadEncodedStrip.3tiff \
+ TIFFReadEncodedTile.3tiff \
+ TIFFReadRawStrip.3tiff \
+ TIFFReadRawTile.3tiff \
+ TIFFReadRGBAImage.3tiff \
+ TIFFReadRGBAStrip.3tiff \
+ TIFFReadRGBATile.3tiff \
+ TIFFReadScanline.3tiff \
+ TIFFReadTile.3tiff \
+ TIFFRGBAImage.3tiff \
+ TIFFSetDirectory.3tiff \
+ TIFFSetField.3tiff \
+ TIFFsize.3tiff \
+ TIFFstrip.3tiff \
+ TIFFswab.3tiff \
+ TIFFtile.3tiff \
+ TIFFWarning.3tiff \
+ TIFFWriteDirectory.3tiff \
+ TIFFWriteEncodedStrip.3tiff \
+ TIFFWriteEncodedTile.3tiff \
+ TIFFWriteRawStrip.3tiff \
+ TIFFWriteRawTile.3tiff \
+ TIFFWriteScanline.3tiff \
+ TIFFWriteTile.3tiff
diff --git a/tiff/man/Makefile.in b/tiff/man/Makefile.in
new file mode 100644
index 0000000..08e1e8b
--- /dev/null
+++ b/tiff/man/Makefile.in
@@ -0,0 +1,602 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Tag Image File Format (TIFF) Software
+#
+# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+#
+# 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.
+
+# Process this file with automake to produce Makefile.in.
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = man
+DIST_COMMON = $(dist_man1_MANS) $(dist_man3_MANS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
+ $(top_builddir)/libtiff/tiffconf.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"
+man3dir = $(mandir)/man3
+NROFF = nroff
+MANS = $(dist_man1_MANS) $(dist_man3_MANS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GLUT_CFLAGS = @GLUT_CFLAGS@
+GLUT_LIBS = @GLUT_LIBS@
+GLU_CFLAGS = @GLU_CFLAGS@
+GLU_LIBS = @GLU_LIBS@
+GL_CFLAGS = @GL_CFLAGS@
+GL_LIBS = @GL_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDIR = @LIBDIR@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
+LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
+LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
+LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
+LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
+LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
+LIBTIFF_VERSION = @LIBTIFF_VERSION@
+LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+dist_man1_MANS = \
+ bmp2tiff.1 \
+ fax2ps.1 \
+ fax2tiff.1 \
+ gif2tiff.1 \
+ pal2rgb.1 \
+ ppm2tiff.1 \
+ ras2tiff.1 \
+ raw2tiff.1 \
+ rgb2ycbcr.1 \
+ sgi2tiff.1 \
+ thumbnail.1 \
+ tiff2bw.1 \
+ tiff2pdf.1 \
+ tiff2ps.1 \
+ tiff2rgba.1 \
+ tiffcmp.1 \
+ tiffcp.1 \
+ tiffcrop.1 \
+ tiffdither.1 \
+ tiffdump.1 \
+ tiffgt.1 \
+ tiffinfo.1 \
+ tiffmedian.1 \
+ tiffset.1 \
+ tiffsplit.1 \
+ tiffsv.1
+
+dist_man3_MANS = \
+ libtiff.3tiff \
+ TIFFbuffer.3tiff \
+ TIFFClose.3tiff \
+ TIFFcodec.3tiff \
+ TIFFcolor.3tiff \
+ TIFFDataWidth.3tiff \
+ TIFFError.3tiff \
+ TIFFFlush.3tiff \
+ TIFFGetField.3tiff \
+ TIFFmemory.3tiff \
+ TIFFOpen.3tiff \
+ TIFFPrintDirectory.3tiff \
+ TIFFquery.3tiff \
+ TIFFReadDirectory.3tiff \
+ TIFFReadEncodedStrip.3tiff \
+ TIFFReadEncodedTile.3tiff \
+ TIFFReadRawStrip.3tiff \
+ TIFFReadRawTile.3tiff \
+ TIFFReadRGBAImage.3tiff \
+ TIFFReadRGBAStrip.3tiff \
+ TIFFReadRGBATile.3tiff \
+ TIFFReadScanline.3tiff \
+ TIFFReadTile.3tiff \
+ TIFFRGBAImage.3tiff \
+ TIFFSetDirectory.3tiff \
+ TIFFSetField.3tiff \
+ TIFFsize.3tiff \
+ TIFFstrip.3tiff \
+ TIFFswab.3tiff \
+ TIFFtile.3tiff \
+ TIFFWarning.3tiff \
+ TIFFWriteDirectory.3tiff \
+ TIFFWriteEncodedStrip.3tiff \
+ TIFFWriteEncodedTile.3tiff \
+ TIFFWriteRawStrip.3tiff \
+ TIFFWriteRawTile.3tiff \
+ TIFFWriteScanline.3tiff \
+ TIFFWriteTile.3tiff
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign man/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(dist_man1_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man3: $(dist_man3_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
+ @list='$(dist_man3_MANS)'; test -n "$(man3dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man3:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_man3_MANS)'; test -n "$(man3dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS)
+installdirs:
+ for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man3
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1 uninstall-man3
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-man3 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 \
+ uninstall-man3
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tiff/man/TIFFClose.3tiff b/tiff/man/TIFFClose.3tiff
new file mode 100644
index 0000000..6dce01f
--- /dev/null
+++ b/tiff/man/TIFFClose.3tiff
@@ -0,0 +1,53 @@
+.\" $Id: TIFFClose.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFClose 3TIFF "November 2, 2005" "libtiff"
+.SH NAME
+TIFFClose \- close a previously opened
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "void TIFFClose(TIFF *" tif ")"
+.SH DESCRIPTION
+.IR TIFFClose
+closes a file that was previously opened with
+.BR TIFFOpen (3TIFF).
+Any buffered data are flushed to the file, including the contents of the
+current directory (if modified); and all resources are reclaimed.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.bR TIFFError (3TIFF)
+routine.
+Likewise, warning messages are directed to the
+.BR TIFFWarning (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.BR TIFFOpen (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFDataWidth.3tiff b/tiff/man/TIFFDataWidth.3tiff
new file mode 100644
index 0000000..614e69b
--- /dev/null
+++ b/tiff/man/TIFFDataWidth.3tiff
@@ -0,0 +1,74 @@
+.\" $Id: TIFFDataWidth.3tiff,v 1.3 2006/03/23 14:54:02 dron Exp $
+.\"
+.\" Copyright (c) 2002, Andrey Kiselev <dron@ak4719.spb.edu>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFDataWidth 3TIFF "September 12, 2002" "libtiff"
+.SH NAME
+TIFFDataWidth \- Get the size of TIFF data types
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFDataWidth(TIFFDataType " type ")"
+.SH DESCRIPTION
+.I TIFFDataWidth
+returns a size of
+.I type
+in bytes.
+Currently following data types are supported:
+.br
+.I TIFF_BYTE
+.br
+.I TIFF_ASCII
+.br
+.I TIFF_SBYTE
+.br
+.I TIFF_UNDEFINED
+.br
+.I TIFF_SHORT
+.br
+.I TIFF_SSHORT
+.br
+.I TIFF_LONG
+.br
+.I TIFF_SLONG
+.br
+.I TIFF_FLOAT
+.br
+.I TIFF_IFD
+.br
+.I TIFF_RATIONAL
+.br
+.I TIFF_SRATIONAL
+.br
+.I TIFF_DOUBLE
+.br
+.SH "RETURN VALUES"
+.br
+.IR TIFFDataWidth
+returns a number of bytes occupied by the item of given type. 0 returned when
+uknown data type supplied.
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFError.3tiff b/tiff/man/TIFFError.3tiff
new file mode 100644
index 0000000..677a1df
--- /dev/null
+++ b/tiff/man/TIFFError.3tiff
@@ -0,0 +1,69 @@
+.\" $Id: TIFFError.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFError 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFError, TIFFSetErrorHandler \- library error handling interface
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "void TIFFError(const char *" module ", const char *" fmt ", " ... ")"
+.sp
+.B "#include <stdarg.h>"
+.sp
+.BI "typedef void (*TIFFErrorHandler)(const char *" module ", const char *" fmt ", va_list " ap ");"
+.br
+.B "TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler handler);"
+.SH DESCRIPTION
+.I TIFFError
+invokes the library-wide error handling function to (normally) write an error
+message to the
+.BR stderr .
+The
+.I fmt
+parameter is a
+.IR printf (3S)
+format string, and any number arguments can be supplied. The
+.I module
+parameter, if non-zero, is printed before the message; it typically is used to
+identify the software module in which an error is detected.
+.PP
+Applications that desire to capture control in the event of an error should
+use
+.IR TIFFSetErrorHandler
+to override the default error handler.
+A
+.SM NULL
+(0) error handling function may be installed to suppress error messages.
+.SH "RETURN VALUES"
+.IR TIFFSetErrorHandler
+returns a reference to the previous error handling function.
+.SH "SEE ALSO"
+.BR TIFFWarning (3TIFF),
+.BR libtiff (3TIFF),
+.BR printf (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFFlush.3tiff b/tiff/man/TIFFFlush.3tiff
new file mode 100644
index 0000000..9d8f2a0
--- /dev/null
+++ b/tiff/man/TIFFFlush.3tiff
@@ -0,0 +1,64 @@
+.\" $Id: TIFFFlush.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFFlush 3TIFF "December 16, 1991" "libtiff"
+.SH NAME
+TIFFFlush, TIFFFlushData \- flush pending writes to an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFFlush(TIFF *" tif ")"
+.br
+.BI "int TIFFFlushData(TIFF *" tif ")"
+.SH DESCRIPTION
+.IR TIFFFlush
+causes any pending writes for the specified file (including writes for the
+current directory) to be done. In normal operation this call is never needed \-
+the library automatically does any flushing required.
+.PP
+.IR TIFFFlushData
+flushes any pending image data for the specified file to be written out;
+directory-related data are not flushed. In normal operation this call is never
+needed \- the library automatically does any flushing required.
+.SH "RETURN VALUES"
+0 is returned if an error is encountered, otherwise 1 is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFWriteEncodedStrip (3TIFF),
+.BR TIFFWriteEncodedTile (3TIFF),
+.BR TIFFWriteRawStrip (3TIFF),
+.BR TIFFWriteRawTile (3TIFF),
+.BR TIFFWriteScanline (3TIFF),
+.BR TIFFWriteTile (3TIFF)
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFGetField.3tiff b/tiff/man/TIFFGetField.3tiff
new file mode 100644
index 0000000..42c5165
--- /dev/null
+++ b/tiff/man/TIFFGetField.3tiff
@@ -0,0 +1,232 @@
+.\" $Id: TIFFGetField.3tiff,v 1.4.2.1 2010-05-06 02:54:43 olivier Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFGetField 3TIFF "March 18, 2005" "libtiff"
+.SH NAME
+TIFFGetField, TIFFVGetField \- get the value(s) of a tag in an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFGetField(TIFF *" tif ", ttag_t " tag ", " ... ")"
+.sp
+.B "#include <stdarg.h>"
+.sp
+.BI "int TIFFVGetField(TIFF *" tif ", ttag_t " tag ", va_list " ap ")"
+.br
+.BI "int TIFFGetFieldDefaulted(TIFF *" tif ", ttag_t " tag ", " ... ")"
+.br
+.BI "int TIFFVGetFieldDefaulted(TIFF *" tif ", ttag_t " tag ", va_list " ap ")"
+.SH DESCRIPTION
+.IR TIFFGetField
+returns the value of a tag or pseudo-tag associated with the the current
+directory of the opened
+.SM TIFF
+file
+.IR tif .
+(A
+.I pseudo-tag
+is a parameter that is used to control the operation of the
+.SM TIFF
+library but whose value is not read or written to the underlying file.) The
+file must have been previously opened with
+.IR TIFFOpen (3TIFF).
+The tag is identified by
+.IR tag ,
+one of the values defined in the include file
+.B tiff.h
+(see also the table below). The type and number of values returned is
+dependent on the tag being requested. The programming interface uses a
+variable argument list as prescribed by the
+.IR stdarg (3)
+interface. The returned values should only be interpreted if
+.IR TIFFGetField
+returns 1.
+.PP
+.IR TIFFVGetField
+is functionally equivalent to
+.IR TIFFGetField
+except that it takes a pointer to a variable argument list.
+.I TIFFVGetField
+is useful for layering interfaces on top of the functionality provided by
+.IR TIFFGetField .
+.PP
+.IR TIFFGetFieldDefaulted
+and
+.IR TIFFVGetFieldDefaulted
+are identical to
+.IR TIFFGetField
+and
+.IR TIFFVGetField ,
+except that if a tag is not defined in the current directory and it has a
+default value, then the default value is returned.
+.PP
+The tags understood by
+.IR libtiff(3TIFF),
+the number of parameter values, and the types for the returned values are
+shown below. The data types are specified as in C and correspond to the types
+used to specify tag values to
+.IR TIFFSetField (3TIFF).
+Remember that
+.IR TIFFGetField
+returns parameter values, so all the listed data types are pointers to storage
+where values should be returned.
+Consult the
+.SM TIFF
+specification (or relevant industry specification) for information on the
+meaning of each tag and their possible values.
+.PP
+.nf
+.ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc*'u+2n
+\fITag Name\fP \fICount\fP \fITypes\fP \fINotes\fP
+.sp 5p
+TIFFTAG_ARTIST 1 char**
+TIFFTAG_BADFAXLINES 1 uint32*
+TIFFTAG_BITSPERSAMPLE 1 uint16*
+TIFFTAG_CLEANFAXDATA 1 uint16*
+TIFFTAG_COLORMAP 3 uint16** 1<<BitsPerSample arrays
+TIFFTAG_COMPRESSION 1 uint16*
+TIFFTAG_CONSECUTIVEBADFAXLINES 1 uint32*
+TIFFTAG_COPYRIGHT 1 char**
+TIFFTAG_DATATYPE 1 uint16*
+TIFFTAG_DATETIME 1 char**
+TIFFTAG_DOCUMENTNAME 1 char**
+TIFFTAG_DOTRANGE 2 uint16*
+TIFFTAG_EXTRASAMPLES 2 uint16*,uint16** count & types array
+TIFFTAG_FAXFILLFUNC 1 TIFFFaxFillFunc* G3/G4 compression pseudo-tag
+TIFFTAG_FAXMODE 1 int* G3/G4 compression pseudo-tag
+TIFFTAG_FILLORDER 1 uint16*
+TIFFTAG_GROUP3OPTIONS 1 uint32*
+TIFFTAG_GROUP4OPTIONS 1 uint32*
+TIFFTAG_HALFTONEHINTS 2 uint16*
+TIFFTAG_HOSTCOMPUTER 1 char**
+TIFFTAG_ICCPROFILE 2 uint32*,void** count, profile data
+TIFFTAG_IMAGEDEPTH 1 uint32*
+TIFFTAG_IMAGEDESCRIPTION 1 char**
+TIFFTAG_IMAGELENGTH 1 uint32*
+TIFFTAG_IMAGEWIDTH 1 uint32*
+TIFFTAG_INKNAMES 1 char**
+TIFFTAG_INKSET 1 uint16*
+TIFFTAG_JPEGCOLORMODE 1 int* JPEG pseudo-tag
+TIFFTAG_JPEGQUALITY 1 int* JPEG pseudo-tag
+TIFFTAG_JPEGTABLES 2 uint32*,void** count & tables
+TIFFTAG_JPEGTABLESMODE 1 int* JPEG pseudo-tag
+TIFFTAG_MAKE 1 char**
+TIFFTAG_MATTEING 1 uint16*
+TIFFTAG_MAXSAMPLEVALUE 1 uint16*
+TIFFTAG_MINSAMPLEVALUE 1 uint16*
+TIFFTAG_MODEL 1 char**
+TIFFTAG_ORIENTATION 1 uint16*
+TIFFTAG_PAGENAME 1 char**
+TIFFTAG_PAGENUMBER 2 uint16*
+TIFFTAG_PHOTOMETRIC 1 uint16*
+TIFFTAG_PHOTOSHOP 2 uint32*,void** count, data
+TIFFTAG_PLANARCONFIG 1 uint16*
+TIFFTAG_PREDICTOR 1 uint16*
+TIFFTAG_PRIMARYCHROMATICITIES 1 float** 6-entry array
+TIFFTAG_REFERENCEBLACKWHITE 1 float** 6-entry array
+TIFFTAG_RESOLUTIONUNIT 1 uint16*
+TIFFTAG_RICHTIFFIPTC 2 uint32*,void** count, data
+TIFFTAG_ROWSPERSTRIP 1 uint32*
+TIFFTAG_SAMPLEFORMAT 1 uint16*
+TIFFTAG_SAMPLESPERPIXEL 1 uint16*
+TIFFTAG_SMAXSAMPLEVALUE 1 double*
+TIFFTAG_SMINSAMPLEVALUE 1 double*
+TIFFTAG_SOFTWARE 1 char**
+TIFFTAG_STONITS 1 double**
+TIFFTAG_STRIPBYTECOUNTS 1 uint32**
+TIFFTAG_STRIPOFFSETS 1 uint32**
+TIFFTAG_SUBFILETYPE 1 uint32*
+TIFFTAG_SUBIFD 2 uint16*,uint32** count & offsets array
+TIFFTAG_TARGETPRINTER 1 char**
+TIFFTAG_THRESHHOLDING 1 uint16*
+TIFFTAG_TILEBYTECOUNTS 1 uint32**
+TIFFTAG_TILEDEPTH 1 uint32*
+TIFFTAG_TILELENGTH 1 uint32*
+TIFFTAG_TILEOFFSETS 1 uint32**
+TIFFTAG_TILEWIDTH 1 uint32*
+TIFFTAG_TRANSFERFUNCTION 1 or 3\(dg uint16**1<<BitsPerSample entry arrays
+TIFFTAG_WHITEPOINT 1 float** 2-entry array
+TIFFTAG_XMLPACKET 2 uint32*,void** count, data
+TIFFTAG_XPOSITION 1 float*
+TIFFTAG_XRESOLUTION 1 float*
+TIFFTAG_YCBCRCOEFFICIENTS 1 float** 3-entry array
+TIFFTAG_YCBCRPOSITIONING 1 uint16*
+TIFFTAG_YCBCRSUBSAMPLING 2 uint16*
+TIFFTAG_YPOSITION 1 float*
+TIFFTAG_YRESOLUTION 1 float*\(dd
+.fi
+\(dg If
+.I SamplesPerPixel
+is one, then a single array is returned; otherwise three arrays are returned.
+.fi
+\(dd The contents of this field are quite complex. See
+.IR "The ICC Profile Format Specification" ,
+Annex B.3 "Embedding ICC Profiles in TIFF Files" (available at
+http://www.color.org) for an explanation.
+.SH AUTOREGISTERED TAGS
+If you can't find the tag in the table above that means this is unsupported
+tag. But you still be able to read it's value if you know the data type of
+that tag. For example, if you want to read the LONG value from the tag 33424
+and ASCII string from the tag 36867 you can use the following code:
+.PP
+.RS
+.nf
+uint16 count;
+void *data;
+
+TIFFGetField(tiff, 33424, &count, &data);
+printf("Tag %d: %d, count %d\n", 33424, *(uint32 *)data, count);
+TIFFGetField(tiff, 36867, &count, &data);
+printf("Tag %d: %s, count %d\n", 36867, (char *)data, count);
+.fi
+.RE
+.PP
+
+
+is not supported by
+.BR libtiff(3TIFF),
+library
+.SH RETURN VALUES
+1 is returned if the tag is defined in the current directory; otherwise a 0 is
+returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.PP
+.BR "Unknown field, tag 0x%x" .
+An unknown tag was supplied.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFSetField (3TIFF),
+.BR TIFFSetDirectory (3TIFF),
+.BR TIFFReadDirectory (3TIFF),
+.BR TIFFWriteDirectory (3TIFF)
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFOpen.3tiff b/tiff/man/TIFFOpen.3tiff
new file mode 100644
index 0000000..dfb4c45
--- /dev/null
+++ b/tiff/man/TIFFOpen.3tiff
@@ -0,0 +1,279 @@
+.\" $Id: TIFFOpen.3tiff,v 1.2 2005/07/01 12:36:22 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFOpen 3TIFF "July 1, 2005" "libtiff"
+.SH NAME
+TIFFOpen, TIFFFdOpen, TIFFClientOpen \- open a
+.SM TIFF
+file for reading or writing
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "TIFF* TIFFOpen(const char *" filename ", const char *" mode ")"
+.br
+.BI "TIFF* TIFFFdOpen(const int " fd ", const char *" filename ", const char *" mode ")"
+.sp
+.B "typedef tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);"
+.br
+.B "typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);"
+.br
+.B "typedef int (*TIFFCloseProc)(thandle_t);"
+.br
+.B "typedef toff_t (*TIFFSizeProc)(thandle_t);"
+.br
+.B "typedef int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);"
+.br
+.B "typedef void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);"
+.sp
+.BI "TIFF* TIFFClientOpen(const char *" filename ", const char *" mode ", thandle_t " clientdata ", TIFFReadWriteProc " readproc ", TIFFReadWriteProc " writeproc ", TIFFSeekProc " seekproc ", TIFFCloseProc " closeproc ", TIFFSizeProc " sizeproc ", TIFFMapFileProc " mapproc ", TIFFUnmapFileProc " unmapproc ")"
+.SH DESCRIPTION
+.IR TIFFOpen
+opens a
+.SM TIFF
+file whose name is
+.I filename
+and returns a handle to be used in subsequent calls to routines in
+.IR libtiff .
+If the open operation fails, then zero is returned.
+The
+.I mode
+parameter specifies if the file is to be opened for reading (``r''),
+writing (``w''), or appending (``a'') and, optionally, whether
+to override certain default aspects of library operation (see below).
+When a file is opened for appending, existing data will not
+be touched; instead new data will be written as additional subfiles.
+If an existing file is opened for writing, all previous data is
+overwritten.
+.PP
+If a file is opened for reading, the first
+.SM TIFF
+directory in the file is automatically read
+(also see
+.IR TIFFSetDirectory (3TIFF)
+for reading directories other than the first).
+If a file is opened for writing or appending, a default directory
+is automatically created for writing subsequent data.
+This directory has all the default values specified in
+.SM TIFF
+Revision 6.0:
+.IR BitsPerSample =1,
+.IR ThreshHolding "=bilevel art scan,"
+.IR FillOrder =1
+(most significant bit of each data byte is filled first),
+.IR Orientation =1
+(the 0th row represents the visual top of the image, and the 0th
+column represents the visual left hand side),
+.IR SamplesPerPixel =1,
+.IR RowsPerStrip =infinity,
+.IR ResolutionUnit =2
+(inches), and
+.IR Compression =1
+(no compression).
+To alter these values, or to define values for additional fields,
+.IR TIFFSetField (3TIFF)
+must be used.
+.PP
+.IR TIFFFdOpen
+is like
+.IR TIFFOpen
+except that it opens a
+.SM TIFF
+file given an open file descriptor
+.IR fd .
+The file's name and mode must reflect that of the open descriptor.
+The object associated with the file descriptor
+.BR "must support random access" .
+.PP
+.IR TIFFClientOpen
+is like
+.IR TIFFOpen
+except that the caller supplies a collection of functions that the
+library will use to do \s-1UNIX\s+1-like I/O operations.
+The
+.I readproc
+and
+.I writeproc
+are called to read and write data at the current file position.
+.I seekproc
+is called to change the current file position a la
+.IR lseek (2).
+.I closeproc
+is invoked to release any resources associated with an open file.
+.I sizeproc
+is invoked to obtain the size in bytes of a file.
+.I mapproc
+and
+.I unmapproc
+are called to map and unmap a file's contents in memory; c.f.
+.IR mmap (2)
+and
+.IR munmap (2).
+The
+.I clientdata
+parameter is an opaque ``handle'' passed to the client-specified
+routines passed as parameters to
+.IR TIFFClientOpen .
+.SH OPTIONS
+The open mode parameter can include the following flags in
+addition to the ``r'', ``w'', and ``a'' flags.
+Note however that option flags must follow the read-write-append
+specification.
+.TP
+.B l
+When creating a new file force information be written with
+Little-Endian byte order (but see below).
+By default the library will create new files using the native
+.SM CPU
+byte order.
+.TP
+.B b
+When creating a new file force information be written with
+Big-Endian byte order (but see below).
+By default the library will create new files using the native
+.SM CPU
+byte order.
+.TP
+.B L
+Force image data that is read or written to be treated with
+bits filled from Least Significant Bit (\s-1LSB\s+1) to
+Most Significant Bit (\s-1MSB\s+1).
+Note that this is the opposite to the way the library has
+worked from its inception.
+.TP
+.B B
+Force image data that is read or written to be treated with
+bits filled from Most Significant Bit (\s-1MSB\s+1) to
+Least Significant Bit (\s-1LSB\s+1); this is the default.
+.TP
+.B H
+Force image data that is read or written to be treated with
+bits filled in the same order as the native
+.SM CPU.
+.TP
+.B M
+Enable the use of memory-mapped files for images opened read-only.
+If the underlying system does not support memory-mapped files
+or if the specific image being opened cannot be memory-mapped
+then the library will fallback to using the normal system interface
+for reading information.
+By default the library will attempt to use memory-mapped files.
+.TP
+.B m
+Disable the use of memory-mapped files.
+.TP
+.B C
+Enable the use of ``strip chopping'' when reading images
+that are comprised of a single strip or tile of uncompressed data.
+Strip chopping is a mechanism by which the library will automatically
+convert the single-strip image to multiple strips,
+each of which has about 8 Kilobytes of data.
+This facility can be useful in reducing the amount of memory used
+to read an image because the library normally reads each strip
+in its entirety.
+Strip chopping does however alter the apparent contents of the
+image because when an image is divided into multiple strips it
+looks as though the underlying file contains multiple separate
+strips.
+Finally, note that default handling of strip chopping is a compile-time
+configuration parameter.
+The default behaviour, for backwards compatibility, is to enable
+strip chopping.
+.TP
+.B c
+Disable the use of strip chopping when reading images.
+.TP
+.B h
+Read TIFF header only, do not load the first image directory. That could be
+useful in case of the broken first directory. We can open the file and proceed
+to the other directories.
+.SH "BYTE ORDER"
+The
+.SM TIFF
+specification (\fBall versions\fP) states that compliant readers
+.IR "must be capable of reading images written in either byte order" .
+Nonetheless some software that claims to support the reading of
+.SM TIFF
+images is incapable of reading images in anything but the native
+.SM CPU
+byte order on which the software was written.
+(Especially notorious
+are applications written to run on Intel-based machines.)
+By default the library will create new files with the native
+byte-order of the
+.SM CPU
+on which the application is run.
+This ensures optimal performance and is portable to any application
+that conforms to the TIFF specification.
+To force the library to use a specific byte-order when creating
+a new file the ``b'' and ``l'' option flags may be included in
+the call to open a file; for example, ``wb'' or ``wl''.
+.SH "RETURN VALUES"
+Upon successful completion
+.IR TIFFOpen ,
+.IR TIFFFdOpen ,
+and
+.IR TIFFClientOpen
+return a
+.SM TIFF
+pointer.
+Otherwise, NULL is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+Likewise, warning messages are directed to the
+.IR TIFFWarning (3TIFF)
+routine.
+.PP
+\fB"%s": Bad mode\fP.
+The specified
+.I mode
+parameter was not one of ``r'' (read), ``w'' (write), or ``a'' (append).
+.PP
+.BR "%s: Cannot open" .
+.IR TIFFOpen ()
+was unable to open the specified filename for read/writing.
+.PP
+.BR "Cannot read TIFF header" .
+An error occurred while attempting to read the header information.
+.PP
+.BR "Error writing TIFF header" .
+An error occurred while writing the default header information
+for a new file.
+.PP
+.BR "Not a TIFF file, bad magic number %d (0x%x)" .
+The magic number in the header was not (hex)
+0x4d4d or (hex) 0x4949.
+.PP
+.BR "Not a TIFF file, bad version number %d (0x%x)" .
+The version field in the header was not 42 (decimal).
+.PP
+.BR "Cannot append to file that has opposite byte ordering" .
+A file with a byte ordering opposite to the native byte
+ordering of the current machine was opened for appending (``a'').
+This is a limitation of the library.
+.SH "SEE ALSO"
+.IR libtiff (3TIFF),
+.IR TIFFClose (3TIFF)
diff --git a/tiff/man/TIFFPrintDirectory.3tiff b/tiff/man/TIFFPrintDirectory.3tiff
new file mode 100644
index 0000000..73cc734
--- /dev/null
+++ b/tiff/man/TIFFPrintDirectory.3tiff
@@ -0,0 +1,70 @@
+.\" $Id: TIFFPrintDirectory.3tiff,v 1.1 2004/11/11 14:39:16 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFPrintDirectory 3TIFF "December 12, 1991" "libtiff"
+.SH NAME
+TIFFPrintDirectory \- print a description of a
+.SM TIFF
+directory
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "void TIFFPrintDirectory(TIFF *" tif ", FILE *" fd ", long " flags ")"
+.SH DESCRIPTION
+.I TIFFPrintDirectory
+prints a description of the current directory in the specified
+.SM TIFF
+file to the standard I/O output stream
+.IR fd .
+The
+.I flags
+parameter is used to control the
+.I "level of detail"
+of the printed information; it is a bit-or of the flags defined in
+.BR tiffio.h :
+.sp .5
+.nf
+.ta \w'#define 'u +\w'TIFFPRINT_JPEGDCTABLES 'u +\w'0x200 'u
+#define TIFFPRINT_NONE 0x0 /* no extra info */
+#define TIFFPRINT_STRIPS 0x1 /* strips/tiles info */
+#define TIFFPRINT_CURVES 0x2 /* color/gray response curves */
+#define TIFFPRINT_COLORMAP 0x4 /* colormap */
+#define TIFFPRINT_JPEGQTABLES 0x100 /* JPEG Q matrices */
+#define TIFFPRINT_JPEGACTABLES 0x200 /* JPEG AC tables */
+#define TIFFPRINT_JPEGDCTABLES 0x200 /* JPEG DC tables */
+.fi
+.SH NOTES
+In C++ the
+.I flags
+parameter defaults to 0.
+.SH "RETURN VALUES"
+None.
+.SH DIAGNOSTICS
+None.
+.SH "SEE ALSO"
+.IR libtiff (3TIFF),
+.IR TIFFOpen (3TIFF),
+.IR TIFFReadDirectory (3TIFF),
+.IR TIFFSetDirectory (3TIFF)
diff --git a/tiff/man/TIFFRGBAImage.3tiff b/tiff/man/TIFFRGBAImage.3tiff
new file mode 100644
index 0000000..5a9f83b
--- /dev/null
+++ b/tiff/man/TIFFRGBAImage.3tiff
@@ -0,0 +1,286 @@
+.\" $Id: TIFFRGBAImage.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFRGBAImage 3TIFF "October 29, 2004" "libtiff"
+.SH NAME
+TIFFRGBAImageOK, TIFFRGBAImageBegin, TIFFRGBAImageGet, TIFFRGBAImageEnd
+\- read and decode an image into a raster
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.B "typedef unsigned char TIFFRGBValue;"
+.B "typedef struct _TIFFRGBAImage TIFFRGBAImage;"
+.sp
+.BI "int TIFFRGBAImageOK(TIFF *" tif ", char " emsg[1024] ")"
+.br
+.BI "int TIFFRGBAImageBegin(TIFFRGBAImage *" img ", TIFF* " tif ", int " stopOnError ", char " emsg[1024] ")"
+.br
+.BI "int TIFFRGBAImageGet(TIFFRGBAImage *" img ", uint32* " raster ", uint32 " width " , uint32 " height ")"
+.br
+.BI "void TIFFRGBAImageEnd(TIFFRGBAImage *" img ")"
+.br
+.SH DESCRIPTION
+The routines described here provide a high-level interface
+through which
+.SM TIFF
+images may be read into memory.
+Images may be strip- or tile-based and have a variety of different
+characteristics: bits/sample, samples/pixel, photometric, etc.
+Decoding state is encapsulated in a
+.I TIFFRGBAImage
+structure making it possible to capture state for multiple images
+and quickly switch between them.
+The target raster format can be customized to a particular application's
+needs by installing custom routines that manipulate image data
+according to application requirements.
+.PP
+The default usage for these routines is: check if an image can
+be processed using
+.IR TIFFRGBAImageOK ,
+construct a decoder state block using
+.IR TIFFRGBAImageBegin ,
+read and decode an image into a target raster using
+.IR TIFFRGBAImageGet ,
+and then
+release resources using
+.IR TIFFRGBAImageEnd .
+.I TIFFRGBAImageGet
+can be called multiple times to decode an image using different
+state parameters.
+If multiple images are to be displayed and there is not enough
+space for each of the decoded rasters, multiple state blocks can
+be managed and then calls can be made to
+.I TIFFRGBAImageGet
+as needed to display an image.
+.PP
+The generated raster is assumed to be an array of
+.I width
+times
+.I height
+32-bit entries, where
+.I width
+must be less than or equal to the width of the image (\c
+.I height
+may be any non-zero size).
+If the raster dimensions are smaller than the image, the image data
+is cropped to the raster bounds.
+If the raster height is greater than that of the image, then the
+image data are placed in the lower part of the raster.
+(Note that the raster is assume to be organized such that the pixel
+at location (\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP];
+with the raster origin in the
+.B lower-left
+hand corner.)
+.PP
+Raster pixels are 8-bit packed red, green, blue, alpha samples.
+The macros
+.IR TIFFGetR ,
+.IR TIFFGetG ,
+.IR TIFFGetB ,
+and
+.I TIFFGetA
+should be used to access individual samples.
+Images without Associated Alpha matting information have a constant
+Alpha of 1.0 (255).
+.PP
+.I TIFFRGBAImageGet
+converts non-8-bit images by scaling sample values.
+Palette, grayscale, bilevel,
+.SM CMYK\c
+, and YCbCr images are converted to
+.SM RGB
+transparently.
+Raster pixels are returned uncorrected by any colorimetry information
+present in the directory.
+.PP
+The parameter
+.I stopOnError
+specifies how to act if an error is encountered while reading
+the image.
+If
+.I stopOnError
+is non-zero, then an error will terminate the operation; otherwise
+.I TIFFRGBAImageGet
+will continue processing data until all the possible data in the
+image have been requested.
+.SH "ALTERNATE RASTER FORMATS"
+To use the core support for reading and processing
+.SM TIFF
+images, but write the resulting raster data in a different format
+one need only override the ``\fIput methods\fP'' used to store raster data.
+These methods are are defined in the
+.I TIFFRGBAImage
+structure and initially setup by
+.I TIFFRGBAImageBegin
+to point to routines that pack raster data in the default
+.SM ABGR
+pixel format.
+Two different routines are used according to the physical organization
+of the image data in the file:
+.IR PlanarConfiguration =1
+(packed samples),
+and
+.IR PlanarConfiguration =2
+(separated samples).
+Note that this mechanism can be used to transform the data before
+storing it in the raster.
+For example one can convert data
+to colormap indices for display on a colormap display.
+.SH "SIMULTANEOUS RASTER STORE AND DISPLAY"
+It is simple to display an image as it is being read into memory
+by overriding the put methods as described above for supporting
+alternate raster formats.
+Simply keep a reference to the default put methods setup by
+.I TIFFRGBAImageBegin
+and then invoke them before or after each display operation.
+For example, the
+.IR tiffgt (1)
+utility uses the following put method to update the display as
+the raster is being filled:
+.sp
+.nf
+.ft C
+static void
+putContigAndDraw(TIFFRGBAImage* img, uint32* raster,
+ uint32 x, uint32 y, uint32 w, uint32 h,
+ int32 fromskew, int32 toskew,
+ unsigned char* cp)
+{
+ (*putContig)(img, raster, x, y, w, h, fromskew, toskew, cp);
+ if (x+w == width) {
+ w = width;
+ if (img->orientation == ORIENTATION_TOPLEFT)
+ lrectwrite(0, y-(h-1), w-1, y, raster-x-(h-1)*w);
+ else
+ lrectwrite(0, y, w-1, y+h-1, raster);
+ }
+}
+.ft R
+.fi
+.sp
+(the original routine provided by the library is saved in the
+variable
+.IR putContig .)
+.SH "SUPPORTING ADDITIONAL TIFF FORMATS"
+The
+.I TIFFRGBAImage
+routines support the most commonly encountered flavors of
+.SM TIFF.
+It is possible to extend this support by overriding the ``\fIget method\fP''
+invoked by
+.I TIFFRGBAImageGet
+to read
+.SM TIFF
+image data.
+Details of doing this are a bit involved, it is best to make a copy
+of an existing get method and modify it to suit the needs of an
+application.
+.SH NOTES
+Samples must be either 1, 2, 4, 8, or 16 bits.
+Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
+.I SamplesPerPixel
+minus
+.IR ExtraSamples ).
+.PP
+Palette image colormaps that appear to be incorrectly written
+as 8-bit values are automatically scaled to 16-bits.
+.SH "RETURN VALUES"
+All routines return
+1 if the operation was successful.
+Otherwise, 0 is returned if an error was encountered and
+.I stopOnError
+is zero.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "Sorry, can not handle %d-bit pictures" .
+The image had
+.I BitsPerSample
+other than 1, 2, 4, 8, or 16.
+.PP
+.BR "Sorry, can not handle %d-channel images" .
+The image had
+.I SamplesPerPixel
+other than 1, 3, or 4.
+.PP
+\fBMissing needed "PhotometricInterpretation" tag\fP.
+The image did not have a tag that describes how to display
+the data.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
+The image was missing a tag that describes how to display it,
+but because it has 3 or 4 samples/pixel, it is assumed to be
+.SM RGB.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP.
+The image was missing a tag that describes how to display it,
+but because it has 1 sample/pixel, it is assumed to be a grayscale
+or bilevel image.
+.PP
+.BR "No space for photometric conversion table" .
+There was insufficient memory for a table used to convert
+image samples to 8-bit
+.SM RGB.
+.PP
+\fBMissing required "Colormap" tag\fP.
+A Palette image did not have a required
+.I Colormap
+tag.
+.PP
+.BR "No space for tile buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "No space for strip buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "Can not handle format" .
+The image has a format (combination of
+.IR BitsPerSample ,
+.IR SamplesPerPixel ,
+and
+.IR PhotometricInterpretation )
+that can not be handled.
+.PP
+.BR "No space for B&W mapping table" .
+There was insufficient memory to allocate a table used to map
+grayscale data to
+.SM RGB.
+.PP
+.BR "No space for Palette mapping table" .
+There was insufficient memory to allocate a table used to map
+data to 8-bit
+.SM RGB.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadRGBAImage (3TIFF),
+.BR TIFFReadRGBAImageOriented (3TIFF),
+.BR TIFFReadRGBAStrip (3TIFF),
+.BR TIFFReadRGBATile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadDirectory.3tiff b/tiff/man/TIFFReadDirectory.3tiff
new file mode 100644
index 0000000..a86bd82
--- /dev/null
+++ b/tiff/man/TIFFReadDirectory.3tiff
@@ -0,0 +1,164 @@
+.\" $Id: TIFFReadDirectory.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadDirectory 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFReadDirectory \- get the contents of the next directory in an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFReadDirectory(TIFF *" tif ")"
+.SH DESCRIPTION
+Read the next directory in the specified file and make it the current
+directory. Applications only need to call
+.I TIFFReadDirectory
+to read multiple subfiles in a single
+.SM TIFF
+file\(em
+the first directory in a file is automatically read when
+.IR TIFFOpen
+is called.
+.SH NOTES
+If the library is compiled with
+.SM STRIPCHOP_SUPPORT
+enabled, then images that have a single uncompressed strip or tile of data are
+automatically treated as if they were made up of multiple strips or tiles of
+approximately 8 kilobytes each. This operation is done only in-memory; it does
+not alter the contents of the file. However, the construction of the ``chopped
+strips'' is visible to the application through the number of strips [tiles]
+returned by
+.I TIFFNumberOfStrips
+[\c
+.IR TIFFNumberOfTiles ].
+.SH "RETURN VALUES"
+If the next directory was successfully read, 1 is returned. Otherwise, 0 is
+returned if an error was encountered, or if there are no more directories to
+be read.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+All warning messages are directed to the
+.IR TIFFWarning (3TIFF)
+routine.
+.PP
+\fBSeek error accessing TIFF directory\fP.
+An error occurred while positioning to the location of the
+directory.
+.PP
+\fBWrong data type %d for field "%s"\fP.
+The tag entry in the directory had an incorrect data type.
+For example, an
+.I ImageDescription
+tag with a
+.SM SHORT
+data type.
+.PP
+\fBTIFF directory is missing required "%s" field\fP.
+The specified tag is required to be present by the
+.SM TIFF
+5.0 specification, but is missing.
+The directory is (usually) unusable.
+.PP
+\fB%s: Rational with zero denominator\fP.
+A directory tag has a
+.SM RATIONAL
+value whose denominator is zero.
+.PP
+\fBIncorrect count %d for field "%s" (%lu, expecting %lu); tag ignored\fP.
+The specified tag's count field is bad.
+For example, a count other than 1 for a
+.I SubFileType
+tag.
+.PP
+\fBCannot handle different per-sample values for field "%s"\fP.
+The tag has
+.I SamplesPerPixel
+values and they are not all the same; e.g.
+.IR BitsPerSample .
+The library is unable to handle images of this sort.
+.PP
+\fBCount mismatch for field "%s"; expecting %d, got %d\fP.
+The count field in a
+tag does not agree with the number expected by the library.
+This should never happen, so if it does, the library refuses to
+read the directory.
+.PP
+\fBInvalid TIFF directory; tags are not sorted in ascending order\fP.
+The directory tags are not properly sorted as specified
+in the
+.SM TIFF
+5.0 specification.
+This error is not fatal.
+.PP
+\fBIgnoring unknown field with tag %d (0x%x)\fP.
+An unknown tag was encountered in the directory;
+the library ignores all such tags.
+.PP
+\fBTIFF directory is missing requred "ImageLength" field\fP.
+The image violates the specification by not having a necessary field.
+There is no way for the library to recover from this error.
+.PP
+\fBTIFF directory is missing requred "PlanarConfig" field\fP.
+The image violates the specification by not having a necessary field.
+There is no way for the library to recover from this error.
+.PP
+\fBTIFF directory is missing requred "StripOffsets" field\fP.
+The image has multiple strips, but is missing the tag that
+specifies the file offset to each strip of data.
+There is no way for the library to recover from this error.
+.PP
+\fBTIFF directory is missing requred "TileOffsets" field\fP.
+The image has multiple tiles, but is missing the tag that
+specifies the file offset to each tile of data.
+There is no way for the library to recover from this error.
+.PP
+\fBTIFF directory is missing required "StripByteCounts" field\fP.
+The image has multiple strips, but is missing the tag that
+specifies the size of each strip of data.
+There is no way for the library to recover from this error.
+.PP
+\fBTIFF directory is missing required "StripByteCounts" field, calculating from imagelength\fP.
+The image violates the specification by not having a necessary field.
+However, when the image is comprised of only one strip or tile, the
+library will estimate the missing value based on the file size.
+.PP
+\fBBogus "StripByteCounts" field, ignoring and calculating from imagelength\fP.
+Certain vendors violate the specification by writing zero for
+the StripByteCounts tag when they want to leave the value
+unspecified.
+If the image has a single strip, the library will estimate
+the missing value based on the file size.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFWriteDirectory (3TIFF),
+.BR TIFFSetDirectory (3TIFF),
+.BR TIFFSetSubDirectory (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadEncodedStrip.3tiff b/tiff/man/TIFFReadEncodedStrip.3tiff
new file mode 100644
index 0000000..83a2644
--- /dev/null
+++ b/tiff/man/TIFFReadEncodedStrip.3tiff
@@ -0,0 +1,78 @@
+.\" $Id: TIFFReadEncodedStrip.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadEncodedStrip 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFReadEncodedStrip \- read and decode a strip of data from an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFReadEncodedStrip(TIFF *" tif ", tstrip_t " strip ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Read the specified strip of data and place up to
+.I size
+bytes of decompressed information in the (user supplied) data buffer.
+.SH NOTES
+The value of
+.I strip
+is a ``raw strip number.''
+That is, the caller must take into account whether or not the data are
+organized in separate planes (\c
+.IR PlanarConfiguration =2).
+To read a full strip of data the data buffer should typically be at least as
+large as the number returned by
+.BR TIFFStripSize (3TIFF).
+If the -1 passed in
+.I size
+parameter, the whole strip will be read. You should be sure you have enough
+space allocated for the buffer.
+.PP
+The library attempts to hide bit- and byte-ordering differences between the
+image and the native machine by converting data to the native machine order.
+Bit reversal is done if the
+.I FillOrder
+tag is opposite to the native machine bit order. 16- and 32-bit samples are
+automatically byte-swapped if the file was written with a byte order opposite
+to the native machine byte order,
+.SH "RETURN VALUES"
+The actual number of bytes of data that were placed in
+.I buf
+is returned;
+.IR TIFFReadEncodedStrip
+returns \-1 if an error was encountered.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadRawStrip (3TIFF),
+.BR TIFFReadScanline (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadEncodedTile.3tiff b/tiff/man/TIFFReadEncodedTile.3tiff
new file mode 100644
index 0000000..c97d6d7
--- /dev/null
+++ b/tiff/man/TIFFReadEncodedTile.3tiff
@@ -0,0 +1,76 @@
+.\" $Id: TIFFReadEncodedTile.3tiff,v 1.3 2006/10/13 07:22:01 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadEncodedTile 3TIFF "October 13, 2006" "libtiff"
+.SH NAME
+TIFFReadEncodedTile \- read and decode a tile of data from an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFReadEncodedTile(TIFF *" tif ", ttile_t " tile ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Read the specified tile of data and place up to
+.I size
+bytes of decompressed information in the (user supplied) data buffer.
+.SH NOTES
+The value of
+.I tile
+is a ``raw tile number.''
+That is, the caller must take into account whether or not the data are
+organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.IR TIFFComputeTile
+automatically does this when converting an (x,y,z,sample) coordinate quadruple
+to a tile number. To read a full tile of data the data buffer should be at
+least as large as the value returned by
+.IR TIFFTileSize .
+.PP
+The library attempts to hide bit- and byte-ordering differences between the
+image and the native machine by converting data to the native machine order.
+Bit reversal is done if the
+.I FillOrder
+tag is opposite to the native machine bit order. 16- and 32-bit samples are
+automatically byte-swapped if the file was written with a byte order opposite
+to the native machine byte order,
+.SH "RETURN VALUES"
+The actual number of bytes of data that were placed in
+.I buf
+is returned;
+.IR TIFFReadEncodedTile
+returns \-1 if an error was encountered.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadRawTile (3TIFF),
+.BR TIFFReadTile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadRGBAImage.3tiff b/tiff/man/TIFFReadRGBAImage.3tiff
new file mode 100644
index 0000000..d2fe330
--- /dev/null
+++ b/tiff/man/TIFFReadRGBAImage.3tiff
@@ -0,0 +1,218 @@
+.\" $Id: TIFFReadRGBAImage.3tiff,v 1.4 2006/10/13 07:22:01 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadRGBAImage 3TIFF "October 13, 2006" "libtiff"
+.SH NAME
+TIFFReadRGBAImage, TIFFReadRGBAImageOriented \- read and decode an image
+into a fixed-format raster
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.B "#define TIFFGetR(abgr) ((abgr) & 0xff)"
+.br
+.B "#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)"
+.br
+.B "#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)"
+.br
+.B "#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff)"
+.sp
+.BI "int TIFFReadRGBAImage(TIFF *" tif ", uint32 " width ", uint32 " height ", uint32 *" raster ", int " stopOnError ")"
+.br
+.BI "int TIFFReadRGBAImageOriented(TIFF *" tif ", uint32 " width ", uint32 " height ", uint32 *" raster ", int " orientation ", int " stopOnError ")"
+.br
+.SH DESCRIPTION
+.IR TIFFReadRGBAImage
+reads a strip- or tile-based image into memory, storing the
+result in the user supplied
+.IR raster .
+The raster is assumed to be an array of
+.I width
+times
+.I height
+32-bit entries, where
+.I width
+must be less than or equal to the width of the image (\c
+.I height
+may be any non-zero size).
+If the raster dimensions are smaller than the image, the image data
+is cropped to the raster bounds.
+If the raster height is greater than that of the image, then the
+image data are placed in the lower part of the raster.
+(Note that the raster is assume to be organized such that the pixel
+at location (\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP];
+with the raster origin in the lower-left hand corner.)
+.PP
+.IR TIFFReadRGBAImageOriented
+works like
+.IR TIFFReadRGBAImage
+with except of that user can specify the raster origin position with the
+.I orientation
+parameter. Four orientations supported:
+.TP
+.B ORIENTATION_TOPLEFT
+origin in top-left corner,
+.TP
+.B ORIENTATION_TOPRIGHT
+origin in top-right corner,
+.TP
+.B ORIENTATION_BOTLEFT
+origin in bottom-left corner
+and
+.TP
+.B ORIENTATION_BOTRIGHT
+origin in bottom-right corner.
+.LP
+If you choose
+.B ORIENTATION_BOTLEFT
+result will be the same as returned by the
+.IR TIFFReadRGBAImage.
+.PP
+Raster pixels are 8-bit packed red, green, blue, alpha samples.
+The macros
+.IR TIFFGetR ,
+.IR TIFFGetG ,
+.IR TIFFGetB ,
+and
+.I TIFFGetA
+should be used to access individual samples.
+Images without Associated Alpha matting information have a constant
+Alpha of 1.0 (255).
+.PP
+.I TIFFReadRGBAImage
+converts non-8-bit images by scaling sample values.
+Palette, grayscale, bilevel,
+.SM CMYK\c
+, and YCbCr images are converted to
+.SM RGB
+transparently.
+Raster pixels are returned uncorrected by any colorimetry information
+present in the directory.
+.PP
+The paramater
+.I stopOnError
+specifies how to act if an error is encountered while reading
+the image.
+If
+.I stopOnError
+is non-zero, then an error will terminate the operation; otherwise
+.I TIFFReadRGBAImage
+will continue processing data until all the possible data in the
+image have been requested.
+.SH NOTES
+In C++ the
+.I stopOnError
+parameter defaults to 0.
+.PP
+Samples must be either 1, 2, 4, 8, or 16 bits.
+Colorimetric samples/pixel must be either 1, 3, or 4 (i.e.
+.I SamplesPerPixel
+minus
+.IR ExtraSamples ).
+.PP
+Palettte image colormaps that appear to be incorrectly written
+as 8-bit values are automatically scaled to 16-bits.
+.PP
+.I TIFFReadRGBAImage
+is just a wrapper around the more general
+.IR TIFFRGBAImage (3TIFF)
+facilities.
+.SH "RETURN VALUES"
+1 is returned if the image was successfully read and converted.
+Otherwise, 0 is returned if an error was encountered and
+.I stopOnError
+is zero.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "Sorry, can not handle %d-bit pictures" .
+The image had
+.I BitsPerSample
+other than 1, 2, 4, 8, or 16.
+.PP
+.BR "Sorry, can not handle %d-channel images" .
+The image had
+.I SamplesPerPixel
+other than 1, 3, or 4.
+.PP
+\fBMissing needed "PhotometricInterpretation" tag\fP.
+The image did not have a tag that describes how to display
+the data.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
+The image was missing a tag that describes how to display it,
+but because it has 3 or 4 samples/pixel, it is assumed to be
+.SM RGB.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP.
+The image was missing a tag that describes how to display it,
+but because it has 1 sample/pixel, it is assumed to be a grayscale
+or bilevel image.
+.PP
+.BR "No space for photometric conversion table" .
+There was insufficient memory for a table used to convert
+image samples to 8-bit
+.SM RGB.
+.PP
+\fBMissing required "Colormap" tag\fP.
+A Palette image did not have a required
+.I Colormap
+tag.
+.PP
+.BR "No space for tile buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "No space for strip buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "Can not handle format" .
+The image has a format (combination of
+.IR BitsPerSample ,
+.IR SamplesPerPixel ,
+and
+.IR PhotometricInterpretation )
+that
+.I TIFFReadRGBAImage
+can not handle.
+.PP
+.BR "No space for B&W mapping table" .
+There was insufficient memory to allocate a table used to map
+grayscale data to
+.SM RGB.
+.PP
+.BR "No space for Palette mapping table" .
+There was insufficient memory to allocate a table used to map
+data to 8-bit
+.SM RGB.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFRGBAImage (3TIFF),
+.BR TIFFReadRGBAStrip (3TIFF),
+.BR TIFFReadRGBATile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadRGBAStrip.3tiff b/tiff/man/TIFFReadRGBAStrip.3tiff
new file mode 100644
index 0000000..2d8b067
--- /dev/null
+++ b/tiff/man/TIFFReadRGBAStrip.3tiff
@@ -0,0 +1,170 @@
+.\" $Id: TIFFReadRGBAStrip.3tiff,v 1.3 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadRGBAStrip 3TIFF "December 10, 1998" "libtiff"
+.SH NAME
+TIFFReadRGBAStrip \- read and decode an image strip into a fixed-format raster
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.B "#define TIFFGetR(abgr) ((abgr) & 0xff)"
+.br
+.B "#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)"
+.br
+.B "#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)"
+.br
+.B "#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff)"
+.sp
+.BI "int TIFFReadRGBAStrip(TIFF *" tif ", uint32 " row ", uint32 *" raster ")"
+.SH DESCRIPTION
+.IR TIFFReadRGBAStrip
+reads a single strip of a strip-based image into memory, storing the result in
+the user supplied RGBA
+.IR raster .
+The raster is assumed to be an array of width times rowsperstrip 32-bit
+entries, where width is the width of the image (TIFFTAG_IMAGEWIDTH) and
+rowsperstrip is the maximum lines in a strip (TIFFTAG_ROWSPERSTRIP).
+
+.PP
+The
+.IR row
+value should be the row of the first row in the strip (strip * rowsperstrip,
+zero based).
+
+.PP
+Note that the raster is assume to be organized such that the pixel at location
+(\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP]; with the
+raster origin in the
+.I lower-left hand corner
+of the strip. That is bottom to top organization. When reading a partial last
+strip in the file the last line of the image will begin at the beginning of
+the buffer.
+
+.PP
+Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros
+.IR TIFFGetR ,
+.IR TIFFGetG ,
+.IR TIFFGetB ,
+and
+.I TIFFGetA
+should be used to access individual samples. Images without Associated Alpha
+matting information have a constant Alpha of 1.0 (255).
+.PP
+See the
+.IR TIFFRGBAImage (3TIFF)
+page for more details on how various image types are converted to RGBA values.
+.SH NOTES
+Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric samples/pixel must
+be either 1, 3, or 4 (i.e.
+.I SamplesPerPixel
+minus
+.IR ExtraSamples ).
+.PP
+Palette image colormaps that appear to be incorrectly written as 8-bit values
+are automatically scaled to 16-bits.
+.PP
+.I TIFFReadRGBAStrip
+is just a wrapper around the more general
+.IR TIFFRGBAImage (3TIFF)
+facilities. It's main advantage over the similar
+.IR TIFFReadRGBAImage()
+function is that for large images a single buffer capable of holding the whole
+image doesn't need to be allocated, only enough for one strip. The
+.IR TIFFReadRGBATile()
+function does a similar operation for tiled images.
+.SH "RETURN VALUES"
+1 is returned if the image was successfully read and converted.
+Otherwise, 0 is returned if an error was encountered.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "Sorry, can not handle %d-bit pictures" .
+The image had
+.I BitsPerSample
+other than 1, 2, 4, 8, or 16.
+.PP
+.BR "Sorry, can not handle %d-channel images" .
+The image had
+.I SamplesPerPixel
+other than 1, 3, or 4.
+.PP
+\fBMissing needed "PhotometricInterpretation" tag\fP.
+The image did not have a tag that describes how to display the data.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
+The image was missing a tag that describes how to display it, but because it
+has 3 or 4 samples/pixel, it is assumed to be
+.SM RGB.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP. The image was
+missing a tag that describes how to display it, but because it has 1
+sample/pixel, it is assumed to be a grayscale or bilevel image.
+.PP
+.BR "No space for photometric conversion table" .
+There was insufficient memory for a table used to convert image samples to
+8-bit
+.SM RGB.
+.PP
+\fBMissing required "Colormap" tag\fP.
+A Palette image did not have a required
+.I Colormap
+tag.
+.PP
+.BR "No space for tile buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "No space for strip buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "Can not handle format" .
+The image has a format (combination of
+.IR BitsPerSample ,
+.IR SamplesPerPixel ,
+and
+.IR PhotometricInterpretation )
+that
+.I TIFFReadRGBAImage
+can not handle.
+.PP
+.BR "No space for B&W mapping table" .
+There was insufficient memory to allocate a table used to map grayscale data
+to
+.SM RGB.
+.PP
+.BR "No space for Palette mapping table" .
+There was insufficient memory to allocate a table used to map data to 8-bit
+.SM RGB.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFRGBAImage (3TIFF),
+.BR TIFFReadRGBAImage (3TIFF),
+.BR TIFFReadRGBATile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
+
diff --git a/tiff/man/TIFFReadRGBATile.3tiff b/tiff/man/TIFFReadRGBATile.3tiff
new file mode 100644
index 0000000..9b52f3d
--- /dev/null
+++ b/tiff/man/TIFFReadRGBATile.3tiff
@@ -0,0 +1,171 @@
+.\" $Id: TIFFReadRGBATile.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadRGBATile 3TIFF "December 10, 1998" "libtiff"
+.SH NAME
+TIFFReadRGBATile \- read and decode an image tile into a fixed-format raster
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.B "#define TIFFGetR(abgr) ((abgr) & 0xff)"
+.br
+.B "#define TIFFGetG(abgr) (((abgr) >> 8) & 0xff)"
+.br
+.B "#define TIFFGetB(abgr) (((abgr) >> 16) & 0xff)"
+.br
+.B "#define TIFFGetA(abgr) (((abgr) >> 24) & 0xff)"
+.sp
+.BI "int TIFFReadRGBATile(TIFF *" tif ", uint32 " x ", uint32 " y ", uint32 *" raster ")"
+.SH DESCRIPTION
+.IR TIFFReadRGBATile
+reads a single tile of a tile-based image into memory, storing the result in
+the user supplied RGBA
+.IR raster .
+The raster is assumed to be an array of width times length 32-bit entries,
+where width is the width of a tile (TIFFTAG_TILEWIDTH) and length is the
+height of a tile (TIFFTAG_TILELENGTH).
+
+.PP
+The
+.IR x
+and
+.IR y
+values are the offsets from the top left corner to the top left corner of the
+tile to be read. They must be an exact multiple of the tile width and length.
+
+.PP
+Note that the raster is assume to be organized such that the pixel at location
+(\fIx\fP,\fIy\fP) is \fIraster\fP[\fIy\fP*\fIwidth\fP+\fIx\fP]; with the
+raster origin in the
+.I lower-left hand corner
+of the tile. That is bottom to top organization. Edge tiles which partly fall
+off the image will be filled out with appropriate zeroed areas.
+
+.PP
+Raster pixels are 8-bit packed red, green, blue, alpha samples. The macros
+.IR TIFFGetR ,
+.IR TIFFGetG ,
+.IR TIFFGetB ,
+and
+.I TIFFGetA
+should be used to access individual samples. Images without Associated Alpha
+matting information have a constant Alpha of 1.0 (255).
+.PP
+See the
+.IR TIFFRGBAImage (3TIFF)
+page for more details on how various image types are converted to RGBA values.
+.SH NOTES
+Samples must be either 1, 2, 4, 8, or 16 bits. Colorimetric samples/pixel must
+be either 1, 3, or 4 (i.e.
+.I SamplesPerPixel
+minus
+.IR ExtraSamples ).
+.PP
+Palette image colormaps that appear to be incorrectly written as 8-bit values
+are automatically scaled to 16-bits.
+.PP
+.I TIFFReadRGBATile
+is just a wrapper around the more general
+.IR TIFFRGBAImage (3TIFF)
+facilities. It's main advantage over the similar
+.IR TIFFReadRGBAImage()
+function is that for large images a single buffer capable of holding the whole
+image doesn't need to be allocated, only enough for one tile. The
+.IR TIFFReadRGBAStrip()
+function does a similar operation for stripped images.
+.SH "RETURN VALUES"
+1 is returned if the image was successfully read and converted.
+Otherwise, 0 is returned if an error was encountered.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "Sorry, can not handle %d-bit pictures" .
+The image had
+.I BitsPerSample
+other than 1, 2, 4, 8, or 16.
+.PP
+.BR "Sorry, can not handle %d-channel images" .
+The image had
+.I SamplesPerPixel
+other than 1, 3, or 4.
+.PP
+\fBMissing needed "PhotometricInterpretation" tag\fP.
+The image did not have a tag that describes how to display the data.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming RGB\fP.
+The image was missing a tag that describes how to display it, but because it
+has 3 or 4 samples/pixel, it is assumed to be
+.SM RGB.
+.PP
+\fBNo "PhotometricInterpretation" tag, assuming min-is-black\fP.
+The image was missing a tag that describes how to display it,
+but because it has 1 sample/pixel, it is assumed to be a grayscale
+or bilevel image.
+.PP
+.BR "No space for photometric conversion table" .
+There was insufficient memory for a table used to convert
+image samples to 8-bit
+.SM RGB.
+.PP
+\fBMissing required "Colormap" tag\fP.
+A Palette image did not have a required
+.I Colormap
+tag.
+.PP
+.BR "No space for tile buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "No space for strip buffer" .
+There was insufficient memory to allocate an i/o buffer.
+.PP
+.BR "Can not handle format" .
+The image has a format (combination of
+.IR BitsPerSample ,
+.IR SamplesPerPixel ,
+and
+.IR PhotometricInterpretation )
+that
+.I TIFFReadRGBAImage
+can not handle.
+.PP
+.BR "No space for B&W mapping table" .
+There was insufficient memory to allocate a table used to map
+grayscale data to
+.SM RGB.
+.PP
+.BR "No space for Palette mapping table" .
+There was insufficient memory to allocate a table used to map data to 8-bit
+.SM RGB.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFRGBAImage (3TIFF),
+.BR TIFFReadRGBAImage (3TIFF),
+.BR TIFFReadRGBAStrip (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadRawStrip.3tiff b/tiff/man/TIFFReadRawStrip.3tiff
new file mode 100644
index 0000000..1d4cac8
--- /dev/null
+++ b/tiff/man/TIFFReadRawStrip.3tiff
@@ -0,0 +1,64 @@
+.\" $Id: TIFFReadRawStrip.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadRawStrip 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFReadRawStrip \- return the undecoded contents of a strip of data from an
+open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFReadRawStrip(TIFF *" tif ", tstrip_t " strip ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Read the contents of the specified strip into the (user supplied) data buffer.
+Note that the value of
+.I strip
+is a ``raw strip number.'' That is, the caller must take into account whether
+or not the data is organized in separate planes (\c
+.IR PlanarConfiguration =2).
+To read a full strip of data the data buffer should typically be at least as
+large as the number returned by
+.IR TIFFStripSize .
+.SH "RETURN VALUES"
+The actual number of bytes of data that were placed in
+.I buf
+is returned;
+.IR TIFFReadEncodedStrip
+returns \-1 if an error was encountered.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadEncodedStrip (3TIFF),
+.BR TIFFReadScanline (3TIFF),
+.BR TIFFStripSize (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadRawTile.3tiff b/tiff/man/TIFFReadRawTile.3tiff
new file mode 100644
index 0000000..5d4a56e
--- /dev/null
+++ b/tiff/man/TIFFReadRawTile.3tiff
@@ -0,0 +1,65 @@
+.\" $Id: TIFFReadRawTile.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadRawTile 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFReadRawTile \- return an undecoded tile of data from an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFReadRawTile(TIFF *" tif ", ttile_t " tile ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Read the contents of the specified tile into the (user supplied) data buffer.
+Note that the value of
+.I tile
+is a ``raw tile number.'' That is, the caller must take into account whether
+or not the data is organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.I TIFFComputeTile
+automatically does this when converting an (x,y,z,sample) coordinate quadruple
+to a tile number. To read a full tile of data the data buffer should typically
+be at least as large as the value returned by
+.IR TIFFTileSize .
+.SH "RETURN VALUES"
+The actual number of bytes of data that were placed in
+.I buf
+is returned;
+.IR TIFFReadEncodedTile
+returns \-1 if an error was encountered.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadEncodedTile (3TIFF),
+.BR TIFFReadTile (3TIFF),
+.BR TIFFTileSize (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadScanline.3tiff b/tiff/man/TIFFReadScanline.3tiff
new file mode 100644
index 0000000..0a46d58
--- /dev/null
+++ b/tiff/man/TIFFReadScanline.3tiff
@@ -0,0 +1,94 @@
+.\" $Id: TIFFReadScanline.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadScanline 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFReadScanline \- read and decode a scanline of data from an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFReadScanline(TIFF *" tif ", tdata_t " buf ", uint32 " row ", tsample_t " sample ")"
+.SH DESCRIPTION
+Read the data for the specified row into the (user supplied) data buffer
+.IR buf .
+The data are returned decompressed and, in the native byte- and bit-ordering,
+but are otherwise packed (see further below). The buffer must be large enough
+to hold an entire scanline of data. Applications should call the routine
+.IR TIFFScanlineSize
+to find out the size (in bytes) of a scanline buffer.
+The
+.I row
+parameter is always used by
+.IR TIFFReadScanline ;
+the
+.I sample
+parameter is used only if data are organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.SH NOTES
+The library attempts to hide bit- and byte-ordering differences between the
+image and the native machine by converting data to the native machine order.
+Bit reversal is done if the
+.I FillOrder
+tag is opposite to the native machine bit order. 16- and 32-bit samples are
+automatically byte-swapped if the file was written with a byte order opposite
+to the native machine byte order,
+.PP
+In C++ the
+.I sample
+parameter defaults to 0.
+.SH "RETURN VALUES"
+.IR TIFFReadScanline
+returns \-1 if it detects an error; otherwise 1 is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "Compression algorithm does not support random access" .
+Data was requested in a non-sequential order from a file that uses a
+compression algorithm and that has
+.I RowsPerStrip
+greater than one.
+That is, data in the image is stored in a compressed form, and with multiple
+rows packed into a strip. In this case, the library does not support random
+access to the data. The data should either be accessed sequentially, or the
+file should be converted so that each strip is made up of one row of data.
+.SH BUGS
+Reading subsampled YCbCR data does not work correctly because, for
+.IR PlanarConfiguration =2
+the size of a scanline is not calculated on a per-sample basis, and for
+.IR PlanarConfiguration =1
+the library does not unpack the block-interleaved samples; use the strip- and
+tile-based interfaces to read these formats.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadEncodedStrip (3TIFF),
+.BR TIFFReadRawStrip (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFReadTile.3tiff b/tiff/man/TIFFReadTile.3tiff
new file mode 100644
index 0000000..512092d
--- /dev/null
+++ b/tiff/man/TIFFReadTile.3tiff
@@ -0,0 +1,84 @@
+.\" $Id: TIFFReadTile.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFReadTile 3TIFF "December 16, 1991" "libtiff"
+.SH NAME
+TIFFReadTile \- read and decode a tile of data from an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFReadTile(TIFF *" tif ", tdata_t " buf ", uint32 " x ", uint32 " y ", uint32 " z ", tsample_t " sample ")"
+.SH DESCRIPTION
+Return the data for the tile
+.I containing
+the specified coordinates. The data placed in
+.I buf
+are returned decompressed and, typically, in the native byte- and
+bit-ordering, but are otherwise packed (see further below). The buffer must be
+large enough to hold an entire tile of data. Applications should call the
+routine
+.IR TIFFTileSize
+to find out the size (in bytes) of a tile buffer. The
+.I x
+and
+.I y
+parameters are always used by
+.IR TIFFReadTile .
+The
+.I z
+parameter is used if the image is deeper than 1 slice (\c
+.IR ImageDepth >1).
+The
+.I sample
+parameter is used only if data are organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.SH NOTES
+The library attempts to hide bit- and byte-ordering differences between the
+image and the native machine by converting data to the native machine order.
+Bit reversal is done if the
+.I FillOrder
+tag is opposite to the native machine bit order. 16- and 32-bit samples are
+automatically byte-swapped if the file was written with a byte order opposite
+to the native machine byte order,
+.SH "RETURN VALUES"
+.IR TIFFReadTile
+returns \-1 if it detects an error; otherwise the number of bytes in the
+decoded tile is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR TIFFCheckTile (3TIFF),
+.BR TIFFComputeTile (3TIFF),
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadEncodedTile (3TIFF),
+.BR TIFFReadRawTile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFSetDirectory.3tiff b/tiff/man/TIFFSetDirectory.3tiff
new file mode 100644
index 0000000..cdd8e46
--- /dev/null
+++ b/tiff/man/TIFFSetDirectory.3tiff
@@ -0,0 +1,79 @@
+.\" $Id: TIFFSetDirectory.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFSetDirectory 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFSetDirectory, TIFFSetSubDirectory \- set the current directory for an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFSetDirectory(TIFF *" tif ", tdir_t " dirnum ")"
+.br
+.BI "int TIFFSetSubDirectory(TIFF *" tif ", uint32 " diroff ")"
+.SH DESCRIPTION
+.I TIFFSetDirectory
+changes the current directory and reads its contents with
+.IR TIFFReadDirectory .
+The parameter
+.I dirnum
+specifies the subfile/directory as an integer number, with the first directory
+numbered zero.
+.PP
+.I TIFFSetSubDirectory
+acts like
+.IR TIFFSetDirectory ,
+except the directory is specified as a file offset instead of an index; this
+is required for accessing subdirectories linked through a
+.I SubIFD
+tag.
+.SH "RETURN VALUES"
+On successful return 1 is returned. Otherwise, 0 is returned if
+.I dirnum
+or
+.I diroff
+specifies a non-existent directory, or if an error was encountered while
+reading the directory's contents.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "%s: Error fetching directory count" .
+An error was encountered while reading the ``directory count'' field.
+.PP
+.BR "%s: Error fetching directory link" .
+An error was encountered while reading the ``link value'' that points to the
+next directory in a file.
+.SH "SEE ALSO"
+.IR TIFFCurrentDirectory (3TIFF),
+.IR TIFFOpen (3TIFF),
+.IR TIFFReadDirectory (3TIFF),
+.IR TIFFWriteDirectory (3TIFF),
+.IR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFSetField.3tiff b/tiff/man/TIFFSetField.3tiff
new file mode 100644
index 0000000..e7baa8c
--- /dev/null
+++ b/tiff/man/TIFFSetField.3tiff
@@ -0,0 +1,217 @@
+.\" $Id: TIFFSetField.3tiff,v 1.4.2.1 2010-05-06 02:54:43 olivier Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFSetField 3TIFF "October 29, 2004" "libtiff"
+.SH NAME
+TIFFSetField, TIFFVSetField \- set the value(s) of a tag in a
+.SM TIFF
+file open for writing
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFSetField(TIFF *" tif ", ttag_t " tag ", " ... ")"
+.sp
+.B "#include <stdarg.h>"
+.sp
+.BI "int TIFFVSetField(TIFF *" tif ", ttag_t " tag ", va_list " ap ")"
+.SH DESCRIPTION
+.IR TIFFSetField
+sets the value of a field
+or pseudo-tag in the current directory associated with
+the open
+.SM TIFF
+file
+.IR tif .
+(A
+.I pseudo-tag
+is a parameter that is used to control the operation of the
+.SM TIFF
+library but whose value is not read or written to the underlying file.)
+To set the value of a field
+the file must have been previously opened for writing with
+.IR TIFFOpen (3TIFF);
+pseudo-tags can be set whether the file was opened for reading
+or writing.
+The field is identified by
+.IR tag ,
+one of the values defined in the include file
+.B tiff.h
+(see also the table below).
+The actual value is specified using a variable argument list,
+as prescribed by the
+.IR stdarg (3)
+interface (\c
+or, on some machines, the
+.IR varargs (3)
+interface.)
+.PP
+.IR TIFFVSetField
+is functionally equivalent to
+.IR TIFFSetField
+except that it takes a pointer to a variable
+argument list.
+.I TIFFVSetField
+is useful for writing routines that are layered
+on top of the functionality provided by
+.IR TIFFSetField .
+.PP
+The tags understood by
+.IR libtiff ,
+the number of parameter values, and the
+expected types for the parameter values are shown below.
+The data types are:
+.I char*
+is null-terminated string and corresponds to the
+.SM ASCII
+data type;
+.I uint16
+is an unsigned 16-bit value;
+.I uint32
+is an unsigned 32-bit value;
+.I uint16*
+is an array of unsigned 16-bit values.
+.I void*
+is an array of data values of unspecified type.
+
+Consult the
+.SM TIFF
+specification for information on the meaning of each tag.
+.PP
+.nf
+.ta \w'TIFFTAG_CONSECUTIVEBADFAXLINES'u+2n +\w'Count'u+2n +\w'TIFFFaxFillFunc \(dg'u+2n
+\fITag Name\fP \fICount\fP \fITypes\fP \fINotes\fP
+.sp 5p
+TIFFTAG_ARTIST 1 char*
+TIFFTAG_BADFAXLINES 1 uint32
+TIFFTAG_BITSPERSAMPLE 1 uint16 \(dg
+TIFFTAG_CLEANFAXDATA 1 uint16
+TIFFTAG_COLORMAP 3 uint16* 1<<BitsPerSample arrays
+TIFFTAG_COMPRESSION 1 uint16 \(dg
+TIFFTAG_CONSECUTIVEBADFAXLINES 1 uint32
+TIFFTAG_COPYRIGHT 1 char*
+TIFFTAG_DATETIME 1 char*
+TIFFTAG_DOCUMENTNAME 1 char*
+TIFFTAG_DOTRANGE 2 uint16
+TIFFTAG_EXTRASAMPLES 2 uint16,uint16* \(dg count & types array
+TIFFTAG_FAXFILLFUNC 1 TIFFFaxFillFunc G3/G4 compression pseudo-tag
+TIFFTAG_FAXMODE 1 int \(dg G3/G4 compression pseudo-tag
+TIFFTAG_FILLORDER 1 uint16 \(dg
+TIFFTAG_GROUP3OPTIONS 1 uint32 \(dg
+TIFFTAG_GROUP4OPTIONS 1 uint32 \(dg
+TIFFTAG_HALFTONEHINTS 2 uint16
+TIFFTAG_HOSTCOMPUTER 1 char*
+TIFFTAG_ICCPROFILE 2 uint32,void* count, profile data
+TIFFTAG_IMAGEDEPTH 1 uint32 \(dg
+TIFFTAG_IMAGEDESCRIPTION 1 char*
+TIFFTAG_IMAGELENGTH 1 uint32
+TIFFTAG_IMAGEWIDTH 1 uint32 \(dg
+TIFFTAG_INKNAMES 2 uint16, char*
+TIFFTAG_INKSET 1 uint16 \(dg
+TIFFTAG_JPEGCOLORMODE 1 int \(dg JPEG pseudo-tag
+TIFFTAG_JPEGQUALITY 1 int JPEG pseudo-tag
+TIFFTAG_JPEGTABLES 2 uint32*,void* \(dg count & tables
+TIFFTAG_JPEGTABLESMODE 1 int \(dg JPEG pseudo-tag
+TIFFTAG_MAKE 1 char*
+TIFFTAG_MATTEING 1 uint16 \(dg
+TIFFTAG_MAXSAMPLEVALUE 1 uint16
+TIFFTAG_MINSAMPLEVALUE 1 uint16
+TIFFTAG_MODEL 1 char*
+TIFFTAG_ORIENTATION 1 uint16
+TIFFTAG_PAGENAME 1 char*
+TIFFTAG_PAGENUMBER 2 uint16
+TIFFTAG_PHOTOMETRIC 1 uint16
+TIFFTAG_PHOTOSHOP ? uint32,void* count, data
+TIFFTAG_PLANARCONFIG 1 uint16 \(dg
+TIFFTAG_PREDICTOR 1 uint16 \(dg
+TIFFTAG_PRIMARYCHROMATICITIES 1 float* 6-entry array
+TIFFTAG_REFERENCEBLACKWHITE 1 float* \(dg 6-entry array
+TIFFTAG_RESOLUTIONUNIT 1 uint16
+TIFFTAG_RICHTIFFIPTC 2 uint32,void* count, data
+TIFFTAG_ROWSPERSTRIP 1 uint32 \(dg must be > 0
+TIFFTAG_SAMPLEFORMAT 1 uint16 \(dg
+TIFFTAG_SAMPLESPERPIXEL 1 uint16 \(dg value must be <= 4
+TIFFTAG_SMAXSAMPLEVALUE 1 double
+TIFFTAG_SMINSAMPLEVALUE 1 double
+TIFFTAG_SOFTWARE 1 char*
+TIFFTAG_STONITS 1 double \(dg
+TIFFTAG_SUBFILETYPE 1 uint32
+TIFFTAG_SUBIFD 2 uint16,uint32* count & offsets array
+TIFFTAG_TARGETPRINTER 1 char*
+TIFFTAG_THRESHHOLDING 1 uint16
+TIFFTAG_TILEDEPTH 1 uint32 \(dg
+TIFFTAG_TILELENGTH 1 uint32 \(dg must be a multiple of 8
+TIFFTAG_TILEWIDTH 1 uint32 \(dg must be a multiple of 8
+TIFFTAG_TRANSFERFUNCTION 1 or 3\(dd uint16* 1<<BitsPerSample entry arrays
+TIFFTAG_WHITEPOINT 1 float* 2-entry array
+TIFFTAG_XMLPACKET 2 uint32,void* count, data
+TIFFTAG_XPOSITION 1 float
+TIFFTAG_XRESOLUTION 1 float
+TIFFTAG_YCBCRCOEFFICIENTS 1 float* \(dg 3-entry array
+TIFFTAG_YCBCRPOSITIONING 1 uint16 \(dg
+TIFFTAG_YCBCRSAMPLING 2 uint16 \(dg
+TIFFTAG_YPOSITION 1 float
+TIFFTAG_YRESOLUTION 1 float
+.fi
+.sp 5p
+\(dg Tag may not have its values changed once data is written.
+.br
+.fi
+\(dd
+If
+.I SamplesPerPixel
+is one, then a single array is passed; otherwise three arrays should be
+passed.
+.fi
+* The contents of this field are quite complex. See
+.BR "The ICC Profile Format Specification" ,
+Annex B.3 "Embedding ICC Profiles in TIFF Files"
+(available at http://www.color.org) for an explanation.
+.br
+.SH "RETURN VALUES"
+1 is returned if the operation was successful.
+Otherwise, 0 is returned if an error was detected.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.PP
+\fB%s: Cannot modify tag "%s" while writing\fP.
+Data has already been written to the file, so the
+specified tag's value can not be changed.
+This restriction is applied to all tags that affect
+the format of written data.
+.PP
+\fB%d: Bad value for "%s"\fP.
+An invalid value was supplied for the named tag.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFGetField (3TIFF),
+.BR TIFFSetDirectory (3TIFF),
+.BR TIFFWriteDirectory (3TIFF),
+.BR TIFFReadDirectory (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWarning.3tiff b/tiff/man/TIFFWarning.3tiff
new file mode 100644
index 0000000..0a71429
--- /dev/null
+++ b/tiff/man/TIFFWarning.3tiff
@@ -0,0 +1,70 @@
+.\" $Id: TIFFWarning.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWarning 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFWarning, TIFFSetWarningHandler \- library warning interface
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "void TIFFWarning(const char *" module ", const char *" fmt ", " ... ")"
+.sp
+.B "#include <stdargh.h>"
+.sp
+.BI "typedef void (*TIFFWarningHandler)(const char *" module ", const char *" fmt ", va_list " ap ");"
+.sp
+.BI "TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler " handler ");"
+.SH DESCRIPTION
+.I TIFFWarning
+invokes the library-wide warning handler function to (normally) write a
+warning message to the
+.BR stderr .
+The
+.I fmt
+parameter is a
+.IR printf (3S)
+format string, and any number arguments can be supplied. The
+.I module
+parameter is interpreted as a string that, if non-zero, should be printed
+before the message; it typically is used to identify the software module in
+which a warning is detected.
+.PP
+Applications that desire to capture control in the event of a warning should
+use
+.IR TIFFSetWarningHandler
+to override the default warning handler.
+A
+.SM NULL
+(0) warning handler function may be installed to suppress error messages.
+.SH "RETURN VALUES"
+.IR TIFFSetWarningHandler
+returns a reference to the previous error handling function.
+.SH "SEE ALSO"
+.BR TIFFError (3TIFF),
+.BR libtiff (3TIFF),
+.BR printf (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWriteDirectory.3tiff b/tiff/man/TIFFWriteDirectory.3tiff
new file mode 100644
index 0000000..85b267b
--- /dev/null
+++ b/tiff/man/TIFFWriteDirectory.3tiff
@@ -0,0 +1,138 @@
+.\" $Id: TIFFWriteDirectory.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWriteDirectory 3TIFF "September 26, 2001" "libtiff"
+.SH NAME
+TIFFWriteDirectory, TIFFRewriteDirectory, TIFFCheckpointDirectory \- write the
+current directory in an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFWriteDirectory(TIFF *" tif ")"
+.br
+.BI "int TIFFRewriteDirectory(TIFF *" tif ")"
+.br
+.BI "int TIFFCheckpointDirectory(TIFF *" tif ")"
+.SH DESCRIPTION
+.IR TIFFWriteDirectory
+will write the contents of the current directory to the file and setup to
+create a new subfile in the same file. Applications only need to call
+.IR TIFFWriteDirectory
+when writing multiple subfiles to a single
+.SM TIFF
+file.
+.IR TIFFWriteDirectory
+is automatically called by
+.IR TIFFClose
+and
+.IR TIFFFlush
+to write a modified directory if the file is open for writing.
+.PP
+The
+.IR TIFFRewriteDirectory
+function operates similarly to
+.IR TIFFWriteDirectory,
+but can be called with directories previously read or written that already
+have an established location in the file. It will rewrite the directory,
+but instead of place it at it's old location (as
+.IR TIFFWriteDirectory
+would) it will place them at the end of the file, correcting the pointer from
+the preceeding directory or file header to point to it's new location. This
+is particularly important in cases where the size of the directory and
+pointed to data has grown, so it won't fit in the space available at the
+old location.
+.PP
+The
+.IR TIFFCheckpointDirectory
+writes the current state of the tiff directory into the file to make what
+is currently in the file readable. Unlike
+.IR TIFFWriteDirectory,
+.IR TIFFCheckpointDirectory
+does not free up the directory data structures in memory, so they can be
+updated (as strips/tiles are written) and written again. Reading such
+a partial file you will at worst get a tiff read error for the first
+strip/tile encountered that is incomplete, but you will at least get
+all the valid data in the file before that. When the file is complete,
+just use
+.IR TIFFWriteDirectory
+as usual to finish it off cleanly.
+.SH "RETURN VALUES"
+1 is returned when the contents are successfully written to the file.
+Otherwise, 0 is returned if an error was encountered when writing
+the directory contents.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "Error post-encoding before directory write" .
+Before writing the contents of the current directory, any pending data are
+flushed. This message indicates that an error occurred while doing this.
+.PP
+.BR "Error flushing data before directory write" .
+Before writing the contents of the current directory, any pending data are
+flushed. This message indicates that an error occurred while doing this.
+.PP
+.BR "Cannot write directory, out of space" .
+There was not enough space to allocate a temporary area for the directory that
+was to be written.
+.PP
+.BR "Error writing directory count" .
+A write error occurred when writing the count of fields in the directory.
+.PP
+.BR "Error writing directory contents" .
+A write error occurred when writing the directory fields.
+.PP
+.BR "Error writing directory link" .
+A write error occurred when writing the link to the next directory.
+.PP
+\fBError writing data for field "%s"\fP.
+A write error occurred when writing indirect data for the specified field.
+.PP
+.BR "Error writing TIFF header" .
+A write error occurred when re-writing header at the front of the file.
+.PP
+.BR "Error fetching directory count" .
+A read error occurred when fetching the directory count field for
+a previous directory.
+This can occur when setting up a link to the directory that is being
+written.
+.PP
+.BR "Error fetching directory link" .
+A read error occurred when fetching the directory link field for
+a previous directory.
+This can occur when setting up a link to the directory that is being
+written.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFError (3TIFF),
+.BR TIFFReadDirectory (3TIFF),
+.BR TIFFSetDirectory (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWriteEncodedStrip.3tiff b/tiff/man/TIFFWriteEncodedStrip.3tiff
new file mode 100644
index 0000000..0427fa2
--- /dev/null
+++ b/tiff/man/TIFFWriteEncodedStrip.3tiff
@@ -0,0 +1,102 @@
+.\" $Id: TIFFWriteEncodedStrip.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWriteEncodedStrip 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFWritedEncodedStrip \- compress and write a strip of data to an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFWriteEncodedStrip(TIFF *" tif ", tstrip_t " strip ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Compress
+.I size
+bytes of raw data from
+.I buf
+and write the result to the specified strip; replacing any previously written
+data. Note that the value of
+.I strip
+is a ``raw strip number.'' That is, the caller must take into account whether
+or not the data are organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.SH NOTES
+The library writes encoded data using the native machine byte order. Correctly
+implemented
+.SM TIFF
+readers are expected to do any necessary byte-swapping to correctly process
+image data with BitsPerSample greater than 8.
+.PP
+The strip number must be valid according to the current settings of the
+.I ImageLength
+and
+.I RowsPerStrip
+tags.
+An image may be dynamically grown by increasing the value of
+.I ImageLength
+prior to each call to
+.IR TIFFWriteEncodedStrip .
+.SH "RETURN VALUES"
+\-1 is returned if an error was encountered. Otherwise, the value of
+.IR size
+is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+\fB%s: File not open for writing\fP. The file was opened for reading, not
+writing.
+.PP
+\fBCan not write scanlines to a tiled image\fP. The image is assumed to be
+organized in tiles because the
+.I TileWidth
+and
+.I TileLength
+tags have been set with
+.IR TIFFSetField (3TIFF).
+.PP
+\fB%s: Must set "ImageWidth" before writing data\fP.
+The image's width has not be set before the first write. See
+.IR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: Must set "PlanarConfiguration" before writing data\fP.
+The organization of data has not be defined before the first write. See
+.IR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: No space for strip arrays"\fP.
+There was not enough space for the arrays that hold strip offsets and byte
+counts.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFWriteScanline (3TIFF),
+.BR TIFFWriteRawStrip (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWriteEncodedTile.3tiff b/tiff/man/TIFFWriteEncodedTile.3tiff
new file mode 100644
index 0000000..20cd1aa
--- /dev/null
+++ b/tiff/man/TIFFWriteEncodedTile.3tiff
@@ -0,0 +1,96 @@
+.\" $Id: TIFFWriteEncodedTile.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWriteEncodedTile 3TIFF "December 16, 1991" "libtiff"
+.SH NAME
+TIFFWritedEncodedTile \- compress and write a tile of data to an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFWriteEncodedTile(TIFF *" tif ", ttile_t " tile ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Compress
+.I size
+bytes of raw data from
+.I buf
+and
+.B append
+the result to the end of the specified tile. Note that the value of
+.I tile
+is a ``raw tile number.'' That is, the caller must take into account whether
+or not the data are organized in separate places (\c
+.IR PlanarConfiguration =2).
+.IR TIFFComputeTile
+automatically does this when converting an (x,y,z,sample) coordinate quadruple
+to a tile number.
+.SH NOTES
+The library writes encoded data using the native machine byte order. Correctly
+implemented
+.SM TIFF
+readers are expected to do any necessary byte-swapping to correctly process
+image data with BitsPerSample greater than 8.
+.SH "RETURN VALUES"
+\-1 is returned if an error was encountered. Otherwise, the value of
+.IR size
+is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.PP
+\fB%s: File not open for writing\fP.
+The file was opened for reading, not writing.
+.PP
+\fBCan not write tiles to a stripped image\fP.
+The image is assumed to be organized in strips because neither of the
+.I TileWidth
+or
+.I TileLength
+tags have been set with
+.BR TIFFSetField (3TIFF).
+.PP
+\fB%s: Must set "ImageWidth" before writing data\fP. The image's width has not
+be set before the first write. See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: Must set "PlanarConfiguration" before writing data\fP. The organization
+of data has not be defined before the first write. See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: No space for tile arrays"\fP.
+There was not enough space for the arrays that hold tile offsets and byte
+counts.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFWriteTile (3TIFF),
+.BR TIFFWriteRawTile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWriteRawStrip.3tiff b/tiff/man/TIFFWriteRawStrip.3tiff
new file mode 100644
index 0000000..43b4a17
--- /dev/null
+++ b/tiff/man/TIFFWriteRawStrip.3tiff
@@ -0,0 +1,96 @@
+.\" $Id: TIFFWriteRawStrip.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWriteRawstrip 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFWriteRawStrip \- write a strip of raw data to an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFWriteRawStrip(TIFF *" tif ", tstrip_t " strip ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Append
+.I size
+bytes of raw data to the specified strip.
+.SH NOTES
+The strip number must be valid according to the current settings of the
+.I ImageLength
+and
+.I RowsPerStrip
+tags.
+An image may be dynamically grown by increasing the value of
+.I ImageLength
+prior to each call to
+.IR TIFFWriteRawStrip .
+.SH "RETURN VALUES"
+\-1 is returned if an error occurred.
+Otherwise, the value of
+.IR size
+is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.PP
+\fB%s: File not open for writing\fP.
+The file was opened for reading, not writing.
+.PP
+\fBCan not write scanlines to a tiled image\fP. The image is assumed to be
+organized in tiles because the
+.I TileWidth
+and
+.I TileLength
+tags have been set with
+.BR TIFFSetField (3TIFF).
+.PP
+\fB%s: Must set "ImageWidth" before writing data\fP.
+The image's width has not be set before the first write.
+See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: Must set "PlanarConfiguration" before writing data\fP.
+The organization of data has not be defined before the first write.
+See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: No space for strip arrays"\fP.
+There was not enough space for the arrays that hold strip
+offsets and byte counts.
+.PP
+\fB%s: Strip %d out of range, max %d\fP.
+The specified strip is not a valid strip according to the
+currently specified image dimensions.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFWriteEncodedStrip (3TIFF),
+.BR TIFFWriteScanline (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWriteRawTile.3tiff b/tiff/man/TIFFWriteRawTile.3tiff
new file mode 100644
index 0000000..c6dbd87
--- /dev/null
+++ b/tiff/man/TIFFWriteRawTile.3tiff
@@ -0,0 +1,84 @@
+.\" $Id: TIFFWriteRawTile.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWriteRawtile 3TIFF "December 16, 1991" "libtiff"
+.SH NAME
+TIFFWriteRawTile \- write a tile of raw data to an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFWriteRawTile(TIFF *" tif ", ttile_t " tile ", tdata_t " buf ", tsize_t " size ")"
+.SH DESCRIPTION
+Append
+.I size
+bytes of raw data to the specified tile.
+.SH "RETURN VALUES"
+\-1 is returned if an error occurred. Otherwise, the value of
+.IR size
+is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.PP
+\fB%s: File not open for writing\fP.
+The file was opened for reading, not writing.
+.PP
+\fBCan not write tiles to a stripped image\fP.
+The image is assumed to be organized in strips because neither of the
+.I TileWidth
+or
+.I TileLength
+tags have been set with
+.BR TIFFSetField (3TIFF).
+.PP
+\fB%s: Must set "ImageWidth" before writing data\fP.
+The image's width has not be set before the first write.
+See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: Must set "PlanarConfiguration" before writing data\fP. The organization
+of data has not be defined before the first write. See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: No space for tile arrays"\fP.
+There was not enough space for the arrays that hold tile offsets and byte
+counts.
+.PP
+\fB%s: Specified tile %d out of range, max %d\fP.
+The specified tile is not valid according to the currently specified image
+dimensions.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFWriteEncodedTile (3TIFF),
+.BR TIFFWriteScanline (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWriteScanline.3tiff b/tiff/man/TIFFWriteScanline.3tiff
new file mode 100644
index 0000000..c8042f9
--- /dev/null
+++ b/tiff/man/TIFFWriteScanline.3tiff
@@ -0,0 +1,154 @@
+.\" $Id: TIFFWriteScanline.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWriteScanline 3TIFF "December 16, 1991" "libtiff"
+.SH NAME
+TIFFWriteScanline \- write a scanline to an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFWriteScanline(TIFF *" tif ", tdata_t " buf ", uint32 " row ", tsample_t " sample ")"
+.SH DESCRIPTION
+Write data to a file at the specified row. The
+.I sample
+parameter is used only if data are organized in separate planes (\c
+.IR PlanarConfiguration =2).
+The data are assumed to be uncompressed and in the native bit- and byte-order
+of the host machine. The data written to the file is compressed according to
+the compression scheme of the current
+.SM TIFF
+directory (see further below). If the current scanline is past the end of the
+current subfile, the
+.I ImageLength
+field is automatically increased to include the scanline (except
+for
+.IR PlanarConfiguration =2,
+where the
+.I ImageLength
+cannot be changed once the first data are written). If the
+.I ImageLength
+is increased, the
+.I StripOffsets
+and
+.I StripByteCounts
+fields are similarly enlarged to reflect data written past the previous end of
+image.
+.SH NOTES
+The library writes encoded data using the native machine byte order. Correctly
+implemented
+.SM TIFF
+readers are expected to do any necessary byte-swapping to correctly process
+image data with BitsPerSample greater than 8. The library attempts to hide
+bit-ordering differences between the image and the native machine by
+converting data from the native machine order.
+.PP
+In C++ the
+.I sample
+parameter defaults to 0.
+.PP
+Once data are written to a file for the current directory, the values of
+certain tags may not be altered; see
+.IR TIFFSetField (3TIFF)
+for more information.
+.PP
+It is not possible to write scanlines to a file that uses a tiled
+organization. The routine
+.IR TIFFIsTiled
+can be used to determine if the file is organized as tiles or strips.
+.SH "RETURN VALUES"
+.IR TIFFWriteScanline
+returns \-1 if it immediately detects an error and 1 for a successful write.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.IR TIFFError (3TIFF)
+routine.
+.PP
+.BR "%s: File not open for writing .
+The file was opened for reading, not writing.
+.PP
+.BR "Can not write scanlines to a tiled image" .
+An attempt was made to write a scanline to a tiled image. The image is assumed
+to be organized in tiles because the
+.I TileWidth
+and
+.I TileLength
+tags have been set with
+.IR TIFFSetField (3TIFF).
+.PP
+.BR "Compression algorithm does not support random access" .
+Data was written in a non-sequential order to a file that uses a compression
+algorithm and that has
+.I RowsPerStrip
+greater than one. That is, data in the image is to be stored in a compressed
+form, and with multiple rows packed into a strip. In this case, the library
+does not support random access to the data. The data should either be written
+as entire strips, sequentially by rows, or the value of
+.I RowsPerStrip
+should be set to one.
+.PP
+\fB%s: Must set "ImageWidth" before writing data\fP.
+The image's width has not be set before the first write.
+See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fB%s: Must set "PlanarConfiguration" before writing data\fP.
+The organization of data has not be defined before the first write.
+See
+.BR TIFFSetField (3TIFF)
+for information on how to do this.
+.PP
+\fBCan not change "ImageLength" when using separate planes\fP. Separate image
+planes are being used (\c
+.IR PlanarConfiguration =2),
+but the number of rows has not been specified before the first write. The
+library supports the dynamic growth of an image only when data are organized
+in a contiguous manner (\c
+.IR PlanarConfiguration =1).
+.PP
+.BR "%d: Sample out of range, max %d" .
+The
+.I sample
+parameter was greater than the value of the SamplesPerPixel tag.
+.PP
+.BR "%s: No space for strip arrays .
+There was not enough space for the arrays that hold strip offsets and byte
+counts.
+.SH BUGS
+Writing subsampled YCbCR data does not work correctly because, for
+.IR PlanarConfiguration =2
+the size of a scanline is not calculated on a per-sample basis, and for
+.IR PlanarConfiguration =1
+the library does not pack the block-interleaved samples.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFWriteEncodedStrip (3TIFF),
+.BR TIFFWriteRawStrip (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFWriteTile.3tiff b/tiff/man/TIFFWriteTile.3tiff
new file mode 100644
index 0000000..c6516af
--- /dev/null
+++ b/tiff/man/TIFFWriteTile.3tiff
@@ -0,0 +1,77 @@
+.\" $Id: TIFFWriteTile.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFWriteTile 3TIFF "November 29, 1999" "libtiff"
+.SH NAME
+TIFFWriteTile \- encode and write a tile of data to an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFWriteTile(TIFF *" tif ", tdata_t " buf ", uint32 " x ", uint32 " y ", uint32 " z ", tsample_t " sample ")"
+.SH DESCRIPTION
+Write the data for the tile
+.I containing
+the specified coordinates. The data in
+.I buf
+are is (potentially) compressed, and written to the indicated file, normally
+being appended to the end of the file. The buffer must be contain an entire
+tile of data. Applications should call the routine
+.IR TIFFTileSize
+to find out the size (in bytes) of a tile buffer. The
+.I x
+and
+.I y
+parameters are always used by
+.IR TIFFWriteTile .
+The
+.I z
+parameter is used if the image is deeper than 1 slice (\c
+.IR ImageDepth >1).
+The
+.I sample
+parameter is used only if data are organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.SH "RETURN VALUES"
+.IR TIFFWriteTile
+returns \-1 if it detects an error; otherwise the number of bytes in the tile
+is returned.
+.SH DIAGNOSTICS
+All error messages are directed to the
+.BR TIFFError (3TIFF)
+routine.
+.SH "SEE ALSO"
+.BR TIFFCheckTile (3TIFF),
+.BR TIFFComputeTile (3TIFF),
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadTile (3TIFF),
+.BR TIFFWriteScanline (3TIFF),
+.BR TIFFWriteEncodedTile (3TIFF),
+.BR TIFFWriteRawTile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFbuffer.3tiff b/tiff/man/TIFFbuffer.3tiff
new file mode 100644
index 0000000..5b45953
--- /dev/null
+++ b/tiff/man/TIFFbuffer.3tiff
@@ -0,0 +1,77 @@
+.\" $Id: TIFFbuffer.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1995 Sam Leffler
+.\" Copyright (c) 1995 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFBUFFER 3TIFF "November 1, 2005" "libtiff"
+.SH NAME
+TIFFReadBufferSetup, TIFFWriteBufferSetup \- I/O buffering control routines
+.SH SYNOPSIS
+.nf
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFReadBufferSetup(TIFF *" tif ", tdata_t " buffer ", tsize_t " size ");"
+.BI "int TIFFWriteBufferSetup(TIFF *" tif ", tdata_t " buffer ", tsize_t " size ");"
+.fi
+.SH DESCRIPTION
+The following routines are provided for client-control of the I/O buffers used
+by the library. Applications need never use these routines; they are provided
+only for ``intelligent clients'' that wish to optimize memory usage and/or
+eliminate potential copy operations that can occur when working with images
+that have data stored without compression.
+.PP
+.I TIFFReadBufferSetup
+sets up the data buffer used to read raw (encoded) data from a file. If the
+specified pointer is
+.SM NULL
+(zero), then a buffer of the appropriate size is allocated. Otherwise the
+caller must guarantee that the buffer is large enough to hold any individual
+strip of raw data.
+.I TIFFReadBufferSetup
+returns a non-zero value if the setup was successful and zero otherwise.
+.PP
+.I TIFFWriteBufferSetup
+sets up the data buffer used to write raw (encoded) data to a file. If the
+specified
+.I size
+is \-1 then the buffer size is selected to hold a complete tile or strip, or
+at least 8 kilobytes, whichever is greater. If the specified
+.I buffer
+is
+.SM NULL
+(zero), then a buffer of the appropriate size is dynamically allocated.
+.I TIFFWriteBufferSetup
+returns a non-zero value if the setup was successful and zero otherwise.
+.SH DIAGNOSTICS
+.BR "%s: No space for data buffer at scanline %ld" .
+.I TIFFReadBufferSetup
+was unable to dynamically allocate space for a data buffer.
+.PP
+.BR "%s: No space for output buffer" .
+.I TIFFWriteBufferSetup
+was unable to dynamically allocate space for a data buffer.
+.SH "SEE ALSO"
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFcodec.3tiff b/tiff/man/TIFFcodec.3tiff
new file mode 100644
index 0000000..55d0d38
--- /dev/null
+++ b/tiff/man/TIFFcodec.3tiff
@@ -0,0 +1,82 @@
+.\" $Id: TIFFcodec.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1995 Sam Leffler
+.\" Copyright (c) 1995 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH CODEC 3TIFF "October 29, 2004" "libtiff"
+.SH NAME
+TIFFFindCODEC, TIFFRegisterCODEC, TIFFUnRegisterCODEC, TIFFIsCODECConfigured
+\- codec-related utility routines
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "const TIFFCodec* TIFFFindCODEC(uint16 " scheme ");"
+.br
+.BI "TIFFCodec* TIFFRegisterCODEC(uint16 " scheme ", const char *" method ", TIFFInitMethod " init ");"
+.br
+.BI "void TIFFUnRegisterCODEC(TIFFCodec *" codec ");"
+.br
+.BI "int TIFFIsCODECConfigured(uint16 " scheme ");"
+.SH DESCRIPTION
+.I libtiff
+supports a variety of compression schemes implemented by software
+.IR codecs .
+Each codec adheres to a modular interface that provides for
+the decoding and encoding of image data; as well as some other
+methods for initialization, setup, cleanup, and the control
+of default strip and tile sizes.
+Codecs are identified by the associated value of the
+.SM TIFF
+.I Compression
+tag; e.g. 5 for
+.SM LZW
+compression.
+.PP
+The
+.I TIFFRegisterCODEC
+routine can be used to
+augment or override the set of codecs available to an application.
+If the specified
+.I scheme
+already has a registered codec then it is
+.I overridden
+and any images with data encoded with this
+compression scheme will be decoded using the supplied coded.
+.PP
+.I TIFFIsCODECConfigured
+returns 1 if the codec is configured and working. Otherwise 0 will be returned.
+.SH DIAGNOSTICS
+.BR "No space to register compression scheme %s" .
+.I TIFFRegisterCODEC
+was unable to allocate memory for the data structures needed
+to register a codec.
+.PP
+.BR "Cannot remove compression scheme %s; not registered" .
+.I TIFFUnRegisterCODEC
+did not locate the specified codec in the table of registered
+compression schemes.
+.SH "SEE ALSO"
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFcolor.3tiff b/tiff/man/TIFFcolor.3tiff
new file mode 100644
index 0000000..a3faf79
--- /dev/null
+++ b/tiff/man/TIFFcolor.3tiff
@@ -0,0 +1,268 @@
+.\" $Id: TIFFcolor.3tiff,v 1.3 2006/03/23 14:54:02 dron Exp $
+.\"
+.\" Copyright (c) 2003, Andrey Kiselev <dron@ak4719.spb.edu>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH COLOR 3TIFF "December 21, 2003" "libtiff"
+.SH NAME
+TIFFYCbCrToRGBInit, TIFFYCbCrtoRGB, TIFFCIELabToRGBInit, TIFFCIELabToXYZ,
+TIFFXYZToRGB \- color conversion routines.
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB *" ycbcr ", float *" luma ", float *"refBlackWhite" );"
+.br
+.BI "void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *" ycbcr ", uint32 " Y ", int32 " Cb ", int32 " Cr ", uint32 *" R ", uint32 *" G ", uint32 *" B " );"
+.sp
+.BI "int TIFFCIELabToRGBInit(TIFFCIELabToRGB *" cielab ", TIFFDisplay *" display ", float *" refWhite ");"
+.br
+.BI "void TIFFCIELabToXYZ(TIFFCIELabToRGB *" cielab ", uint32 " L ", int32 " a ", int32 " b ", float *" X ", float *" Y ", float *" Z ");"
+.br
+.BI "void TIFFXYZToRGB(TIFFCIELabToRGB *" cielab ", float " X ", float " Y ", float " Z" , uint32 *" R ", uint32 *" G ", uint32 *" B ");"
+.SH DESCRIPTION
+TIFF supports several color spaces for images stored in that format. There is
+usually a problem of application to handle the data properly and convert
+between different colorspaces for displaying and printing purposes. To
+simplify this task libtiff implements several color conversion routines
+itself. In particular, these routines used in
+.B TIFFRGBAImage(3TIFF)
+interface.
+.PP
+.B TIFFYCbCrToRGBInit()
+used to initialize
+.I YCbCr
+to
+.I RGB
+conversion state. Allocating and freeing of the
+.I ycbcr
+structure belongs to programmer.
+.I TIFFYCbCrToRGB
+defined in
+.B tiffio.h
+as
+.PP
+.RS
+.nf
+typedef struct { /* YCbCr->RGB support */
+ TIFFRGBValue* clamptab; /* range clamping table */
+ int* Cr_r_tab;
+ int* Cb_b_tab;
+ int32* Cr_g_tab;
+ int32* Cb_g_tab;
+ int32* Y_tab;
+} TIFFYCbCrToRGB;
+.fi
+.RE
+.PP
+.I luma
+is a float array of three values representing proportions of the red, green
+and blue in luminance, Y (see section 21 of the TIFF 6.0 specification, where
+the YCbCr images discussed).
+.I TIFFTAG_YCBCRCOEFFICIENTS
+holds that values in TIFF file.
+.I refBlackWhite
+is a float array of 6 values which specifies a pair of headroom and footroom
+image data values (codes) for each image component (see section 20 of the
+TIFF 6.0 specification where the colorinmetry fields discussed).
+.I TIFFTAG_REFERENCEBLACKWHITE
+is responsible for storing these values in TIFF file. Following code snippet
+should helps to understand the the technique:
+.PP
+.RS
+.nf
+float *luma, *refBlackWhite;
+uint16 hs, vs;
+
+/* Initialize structures */
+ycbcr = (TIFFYCbCrToRGB*)
+ _TIFFmalloc(TIFFroundup(sizeof(TIFFYCbCrToRGB), sizeof(long))
+ + 4*256*sizeof(TIFFRGBValue)
+ + 2*256*sizeof(int)
+ + 3*256*sizeof(int32));
+if (ycbcr == NULL) {
+ TIFFError("YCbCr->RGB",
+ "No space for YCbCr->RGB conversion state");
+ exit(0);
+}
+
+TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);
+TIFFGetFieldDefaulted(tif, TIFFTAG_REFERENCEBLACKWHITE, &refBlackWhite);
+if (TIFFYCbCrToRGBInit(ycbcr, luma, refBlackWhite) < 0)
+ exit(0);
+
+/* Start conversion */
+uint32 r, g, b;
+uint32 Y;
+int32 Cb, Cr;
+
+for each pixel in image
+ TIFFYCbCrtoRGB(img->ycbcr, Y, Cb, Cr, &r, &g, &b);
+
+/* Free state structure */
+_TIFFfree(ycbcr);
+.fi
+.RE
+.PP
+
+.PP
+.B TIFFCIELabToRGBInit()
+initializes the
+.I CIE L*a*b* 1976
+to
+.I RGB
+conversion state.
+.B TIFFCIELabToRGB
+defined as
+.PP
+.RS
+.nf
+#define CIELABTORGB_TABLE_RANGE 1500
+
+typedef struct { /* CIE Lab 1976->RGB support */
+ int range; /* Size of conversion table */
+ float rstep, gstep, bstep;
+ float X0, Y0, Z0; /* Reference white point */
+ TIFFDisplay display;
+ float Yr2r[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yr to r */
+ float Yg2g[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yg to g */
+ float Yb2b[CIELABTORGB_TABLE_RANGE + 1]; /* Conversion of Yb to b */
+} TIFFCIELabToRGB;
+.fi
+.RE
+.PP
+.I display
+is a display device description, declared as
+.PP
+.RS
+.nf
+typedef struct {
+ float d_mat[3][3]; /* XYZ -> luminance matrix */
+ float d_YCR; /* Light o/p for reference white */
+ float d_YCG;
+ float d_YCB;
+ uint32 d_Vrwr; /* Pixel values for ref. white */
+ uint32 d_Vrwg;
+ uint32 d_Vrwb;
+ float d_Y0R; /* Residual light for black pixel */
+ float d_Y0G;
+ float d_Y0B;
+ float d_gammaR; /* Gamma values for the three guns */
+ float d_gammaG;
+ float d_gammaB;
+} TIFFDisplay;
+.fi
+.RE
+.PP
+For example, the one can use sRGB device, which has the following parameters:
+.PP
+.RS
+.nf
+TIFFDisplay display_sRGB = {
+ { /* XYZ -> luminance matrix */
+ { 3.2410F, -1.5374F, -0.4986F },
+ { -0.9692F, 1.8760F, 0.0416F },
+ { 0.0556F, -0.2040F, 1.0570F }
+ },
+ 100.0F, 100.0F, 100.0F, /* Light o/p for reference white */
+ 255, 255, 255, /* Pixel values for ref. white */
+ 1.0F, 1.0F, 1.0F, /* Residual light o/p for black pixel */
+ 2.4F, 2.4F, 2.4F, /* Gamma values for the three guns */
+};
+.fi
+.RE
+.PP
+.I refWhite
+is a color temperature of the reference white. The
+.I TIFFTAG_WHITEPOINT
+contains the chromaticity of the white point of the image from where the
+reference white can be calculated using following formulae:
+.PP
+.RS
+refWhite_Y = 100.0
+.br
+refWhite_X = whitePoint_x / whitePoint_y * refWhite_Y
+.br
+refWhite_Z = (1.0 - whitePoint_x - whitePoint_y) / whitePoint_y * refWhite_X
+.br
+.RE
+.PP
+The conversion itself performed in two steps: at the first one we will convert
+.I CIE L*a*b* 1976
+to
+.I CIE XYZ
+using
+.B TIFFCIELabToXYZ()
+routine, and at the second step we will convert
+.I CIE XYZ
+to
+.I RGB
+using
+.B TIFFXYZToRGB().
+Look at the code sample below:
+.PP
+.RS
+.nf
+float *whitePoint;
+float refWhite[3];
+
+/* Initialize structures */
+img->cielab = (TIFFCIELabToRGB *)
+ _TIFFmalloc(sizeof(TIFFCIELabToRGB));
+if (!cielab) {
+ TIFFError("CIE L*a*b*->RGB",
+ "No space for CIE L*a*b*->RGB conversion state.");
+ exit(0);
+}
+
+TIFFGetFieldDefaulted(tif, TIFFTAG_WHITEPOINT, &whitePoint);
+refWhite[1] = 100.0F;
+refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
+refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])
+ / whitePoint[1] * refWhite[1];
+if (TIFFCIELabToRGBInit(cielab, &display_sRGB, refWhite) < 0) {
+ TIFFError("CIE L*a*b*->RGB",
+ "Failed to initialize CIE L*a*b*->RGB conversion state.");
+ _TIFFfree(cielab);
+ exit(0);
+}
+
+/* Now we can start to convert */
+uint32 r, g, b;
+uint32 L;
+int32 a, b;
+float X, Y, Z;
+
+for each pixel in image
+ TIFFCIELabToXYZ(cielab, L, a, b, &X, &Y, &Z);
+ TIFFXYZToRGB(cielab, X, Y, Z, &r, &g, &b);
+
+/* Don't forget to free the state structure */
+_TIFFfree(cielab);
+.fi
+.RE
+.PP
+.SH "SEE ALSO"
+.BR TIFFRGBAImage (3TIFF)
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFmemory.3tiff b/tiff/man/TIFFmemory.3tiff
new file mode 100644
index 0000000..eaca15f
--- /dev/null
+++ b/tiff/man/TIFFmemory.3tiff
@@ -0,0 +1,90 @@
+.\" $Id: TIFFmemory.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1995 Sam Leffler
+.\" Copyright (c) 1995 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH MEMORY 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+_TIFFmalloc, \c
+_TIFFrealloc, \c
+_TIFFfree, \c
+_TIFFmemset, \c
+_TIFFmemcpy, \c
+_TIFFmemcmp, \c
+\- memory management-related functions for use with
+.SM TIFF
+files
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tdata_t _TIFFmalloc(tsize_t " size ");"
+.br
+.BI "tdata_t _TIFFrealloc(tdata_t " buffer ", tsize_t " size ");"
+.br
+.BI "void _TIFFfree(tdata_t " buffer ");"
+.br
+.BI "void _TIFFmemset(tdata_t " s ", int " c ", tsize_t " n ");"
+.br
+.BI "void _TIFFmemcpy(tdata_t " dest ", const tdata_t " src ", tsize_t " n ");"
+.br
+.BI "int _TIFFmemcmp(const tdata_t " s1 ", const tdata_t "s2 ", tsize_t " n ");"
+.SH DESCRIPTION
+These routines are provided for writing portable software that uses
+.IR libtiff ;
+they hide any memory-management related issues, such as dealing with segmented
+architectures found on 16-bit machines.
+.PP
+.I _TIFFmalloc
+and
+.I _TIFFrealloc
+are used to dynamically allocate and reallocate memory used by
+.IR libtiff ;
+such as memory passed into the I/O routines. Memory allocated through these
+interfaces is released back to the system using the
+.I _TIFFfree
+routine.
+.PP
+Memory allocated through one of the above interfaces can be set to a known
+value using
+.IR _TIFFmemset ,
+copied to another memory location using
+.IR _TIFFmemcpy ,
+or compared for equality using
+.IR _TIFFmemcmp .
+These routines conform to the equivalent
+.SM ANSI
+C routines:
+.IR memset ,
+.IR memcpy ,
+and
+.IR memcmp ,
+repsectively.
+.SH DIAGNOSTICS
+None.
+.SH "SEE ALSO"
+.BR malloc (3),
+.BR memory (3),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFquery.3tiff b/tiff/man/TIFFquery.3tiff
new file mode 100644
index 0000000..7e84097
--- /dev/null
+++ b/tiff/man/TIFFquery.3tiff
@@ -0,0 +1,142 @@
+.\" $Id: TIFFquery.3tiff,v 1.1 2004/11/11 14:39:16 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH QUERY 3TIFF "October 29, 2004" "libtiff"
+.SH NAME
+TIFFCurrentRow,
+TIFFCurrentStrip,
+TIFFCurrentTile,
+TIFFCurrentDirectory,
+TIFFLastDirectory,
+TIFFFileno,
+TIFFFileName,
+TIFFGetMode,
+TIFFIsTiled,
+TIFFIsByteSwapped,
+TIFFIsUpSampled,
+TIFFIsMSB2LSB,
+TIFFGetVersion
+\- query routines
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "uint32 TIFFCurrentRow(TIFF* " tif ")"
+.br
+.BI "tstrip_t TIFFCurrentStrip(TIFF* " tif ")"
+.br
+.BI "ttile_t TIFFCurrentTile(TIFF* " tif ")"
+.br
+.BI "tdir_t TIFFCurrentDirectory(TIFF* " tif ")"
+.br
+.BI "int TIFFLastDirectory(TIFF* " tif ")"
+.br
+.BI "int TIFFFileno(TIFF* " tif ")"
+.br
+.BI "char* TIFFFileName(TIFF* " tif ")"
+.br
+.BI "int TIFFGetMode(TIFF* " tif ")"
+.br
+.BI "int TIFFIsTiled(TIFF* " tif ")"
+.br
+.BI "int TIFFIsByteSwapped(TIFF* " tif ")"
+.br
+.BI "int TIFFIsUpSampled(TIFF* " tif ")"
+.br
+.BI "int TIFFIsMSB2LSB(TIFF* " tif ")"
+.br
+.BI "const char* TIFFGetVersion(void)"
+.SH DESCRIPTION
+The following routines return status information about an open
+.SM TIFF
+file.
+.PP
+.IR TIFFCurrentDirectory
+returns the index of the current directory (directories are numbered starting
+at 0). This number is suitable for use with the
+.IR TIFFSetDirectory
+routine.
+.PP
+.IR TIFFLastDirectory
+returns a non-zero value if the current directory is the last directory in the
+file; otherwise zero is returned.
+.PP
+.IR TIFFCurrentRow ,
+.IR TIFFCurrentStrip ,
+and
+.IR TIFFCurrentTile ,
+return the current row, strip, and tile, respectively, that is being read or
+written. These values are updated each time a read or write is done.
+.PP
+.IR TIFFFileno
+returns the underlying file descriptor used to access the
+.SM TIFF
+image in the filesystem.
+.PP
+.IR TIFFFileName
+returns the pathname argument passed to
+.IR TIFFOpen
+or
+.IR TIFFFdOpen .
+.PP
+.IR TIFFGetMode
+returns the mode with which the underlying file was opened. On
+.SM UNIX
+systems, this is the value passed to the
+.IR open (2)
+system call.
+.PP
+.IR TIFFIsTiled
+returns a non-zero value if the image data has a tiled organization. Zero is
+returned if the image data is organized in strips.
+.PP
+.IR TIFFIsByteSwapped
+returns a non-zero value if the image data was in a different byte-order than
+the host machine. Zero is returned if the TIFF file and local host byte-orders
+are the same. Note that TIFFReadTile(), TIFFReadStrip() and
+TIFFReadScanline() functions already normally perform byte swapping to local
+host order if needed.
+.PP
+.I TIFFIsUpSampled
+returns a non-zero value if image data returned through the read interface
+routines is being up-sampled. This can be useful to applications that want to
+calculate I/O buffer sizes to reflect this usage (though the usual strip and
+tile size routines already do this).
+.PP
+.I TIFFIsMSB2LSB
+returns a non-zero value if the image data is being returned with bit 0 as the
+most significant bit.
+.PP
+.IR TIFFGetVersion
+returns an
+.SM ASCII
+string that has a version stamp for the
+.SM TIFF
+library software.
+.SH DIAGNOSTICS
+None.
+.SH "SEE ALSO"
+.IR libtiff (3TIFF),
+.IR TIFFOpen (3TIFF),
+.IR TIFFFdOpen (3TIFF)
diff --git a/tiff/man/TIFFsize.3tiff b/tiff/man/TIFFsize.3tiff
new file mode 100644
index 0000000..ae6346c
--- /dev/null
+++ b/tiff/man/TIFFsize.3tiff
@@ -0,0 +1,59 @@
+.\" $Id: TIFFsize.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFSIZE 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFScanlineSize, TIFFRasterScanlineSize,
+\- return the size of various items associated with an open
+.SM TIFF
+file
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "tsize_t TIFFRasterScanlineSize(TIFF *" tif ")"
+.br
+.BI "tsize_t TIFFScanlineSize(TIFF *" tif ")"
+.SH DESCRIPTION
+.I TIFFScanlineSize
+returns the size in bytes of a row of data as it would be returned in a call
+to
+.IR TIFFReadScanline ,
+or as it would be expected in a call to
+.IR TIFFWriteScanline .
+.PP
+.I TIFFRasterScanlineSize
+returns the size in bytes of a complete decoded and packed raster scanline.
+Note that this value may be different from the value returned by
+.I TIFFScanlineSize
+if data is stored as separate planes.
+.SH DIAGNOSTICS
+None.
+.SH "SEE ALSO"
+.BR TIFFOpen (3TIFF),
+.BR TIFFReadScanline (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFstrip.3tiff b/tiff/man/TIFFstrip.3tiff
new file mode 100644
index 0000000..7c383c1
--- /dev/null
+++ b/tiff/man/TIFFstrip.3tiff
@@ -0,0 +1,99 @@
+.\" $Id: TIFFstrip.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1992-1997 Sam Leffler
+.\" Copyright (c) 1992-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFSTRIP 3TIFF "October 15, 1995" "libtiff"
+.SH NAME
+TIFFDefaultStripSize, TIFFStripSize, TIFFVStripSize, TIFFRawStripSize,
+TIFFComputeStrip, TIFFNumberOfStrips \- strip-related utility routines
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "uint32 TIFFDefaultStripSize(TIFF *" tif ", uint32 " estimate ")"
+.br
+.BI "tsize_t TIFFStripSize(TIFF *" tif ")"
+.br
+.BI "tsize_t TIFFVStripSize(TIFF *" tif ", uint32 " nrows ")"
+.br
+.BI "tsize_t TIFFRawStripSize(TIFF *" tif ", tstrip_t " strip ")"
+.br
+.BI "tstrip_t TIFFComputeStrip(TIFF *" tif ", uint32 " row ", tsample_t " sample ")"
+.br
+.BI "tstrip_t TIFFNumberOfStrips(TIFF *" tif ")"
+.SH DESCRIPTION
+.I TIFFDefaultStripSize
+returns the number of rows for a reasonable-sized strip according to the
+current settings of the
+.IR ImageWidth ,
+.IR BitsPerSample ,
+.IR SamplesPerPixel ,
+tags and any compression-specific requirements. If the
+.I estimate
+parameter, if non-zero, then it is taken as an estimate of the desired strip
+size and adjusted according to any compression-specific requirements. The
+value returned by this function is typically used to define the
+.I RowsPerStrip
+tag. In lieu of any unusual requirements
+.I TIFFDefaultStripSize
+tries to create strips that have approximately
+8 kilobytes of uncompressed data.
+.PP
+.IR TIFFStripSize
+returns the equivalent size for a strip of data as it would be returned in a
+call to
+.IR TIFFReadEncodedStrip
+or as it would be expected in a call to
+.IR TIFFWriteEncodedStrip .
+.PP
+.I TIFFVStripSize
+returns the number of bytes in a strip with
+.I nrows
+rows of data.
+.PP
+.I TIFFRawStripSize
+returns the number of bytes in a raw strip (i.e. not decoded).
+.PP
+.IR TIFFComputeStrip
+returns the strip that contains the specified coordinates. A valid strip is
+always returned; out-of-range coordinate values are clamped to the bounds of
+the image. The
+.I row
+parameter is always used in calculating a strip. The
+.I sample
+parameter is used only if data are organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.PP
+.IR TIFFNumberOfStrips
+returns the number of strips in the image.
+.SH DIAGNOSTICS
+None.
+.SH "SEE ALSO"
+.BR TIFFReadEncodedStrip (3TIFF),
+.BR TIFFReadRawStrip (3TIFF),
+.BR TIFFWriteEncodedStrip (3TIFF),
+.BR TIFFWriteRawStrip (3TIFF),
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFswab.3tiff b/tiff/man/TIFFswab.3tiff
new file mode 100644
index 0000000..a72ea1b
--- /dev/null
+++ b/tiff/man/TIFFswab.3tiff
@@ -0,0 +1,80 @@
+.\" $Id: TIFFswab.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH SWAB 3TIFF "November 04, 2004" "libtiff"
+.SH NAME
+TIFFGetBitRevTable, TIFFReverseBits, TIFFSwabShort, TIFFSwabLong,
+TIFFSwabArrayOfShort, TIFFSwabArrayOfLong \- byte- and bit-swapping routines
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "const unsigned char* TIFFGetBitRevTable(int " reversed ")"
+.br
+.BI "void TIFFReverseBits(u_char *" data ", unsigned long " nbytes ")"
+.br
+.BI "void TIFFSwabShort(uint16 *" data ")"
+.br
+.BI "void TIFFSwabLong(uint32 *" data ")"
+.br
+.BI "void TIFFSwabArrayOfShort(uint16 *" data ", unsigned long " nshorts ")"
+.br
+.BI "void TIFFSwabArrayOfLong(uint32 *" data ", unsigned long " nlongs ")"
+.SH DESCRIPTION
+The following routines are used by the library to swap
+16- and 32-bit data and to reverse the order of bits in bytes.
+.PP
+.IR TIFFSwabShort
+and
+.IR TIFFSwabLong
+swap the bytes in a single 16-bit and 32-bit item, respectively.
+.IR TIFFSwabArrayOfShort
+and
+.IR TIFFSwabArrayOfLong
+swap the bytes in an array of 16-bit and 32-bit items, respectively.
+.PP
+.IR TIFFReverseBits
+replaces each byte in
+.I data
+with the equivalent bit-reversed value. This operation is performed with a
+lookup table, which is returned using the
+.IR TIFFGetBitRevTable
+function.
+.I reversed
+parameter specifies which table should be returned. Supply
+.I 1
+if you want bit reversal table. Supply
+.I 0
+to get the table that do not reverse bit values. It is a lookup table that can
+be used as an
+.IR "identity function" ;
+i.e.
+.IR "TIFFNoBitRevTable[n] == n" .
+.SH DIAGNOSTICS
+None.
+.SH "SEE ALSO"
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/TIFFtile.3tiff b/tiff/man/TIFFtile.3tiff
new file mode 100644
index 0000000..94bab6c
--- /dev/null
+++ b/tiff/man/TIFFtile.3tiff
@@ -0,0 +1,131 @@
+.\" $Id: TIFFtile.3tiff,v 1.2 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFTILE 3TIFF "February 14, 1992" "libtiff"
+.SH NAME
+TIFFTileSize, TIFFTileRowSize, TIFFVTileSize, TIFFDefaultTileSize,
+TIFFComputeTile, TIFFCheckTile, TIFFNumberOfTiles \- tile-related utility
+routines
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "void TIFFDefaultTileSize(TIFF *" tif ", uint32 *" tw ", uint32 *" th ")"
+.br
+.BI "tsize_t TIFFTileSize(TIFF *" tif ")"
+.br
+.BI "tsize_t TIFFTileRowSize(TIFF *" tif ")"
+.br
+.BI "tsize_t TIFFVTileSize(TIFF *" tif ", uint32 " nrows ")"
+.br
+.BI "ttile_t TIFFComputeTile(TIFF *" tif ", uint32 " x ", uint32 " y ", uint32 " z ", tsample_t " sample ")"
+.br
+.BI "int TIFFCheckTile(TIFF *" tif ", uint32 " x ", uint32 " y ", uint32 " z ", tsample_t " sample ")"
+.br
+.BI "ttile_t TIFFNumberOfTiles(TIFF *" tif ")"
+.br
+.SH DESCRIPTION
+.I TIFFDefaultTileSize
+returns the pixel width and height of a reasonable-sized tile; suitable for
+setting up the
+.I TileWidth
+and
+.I TileLength
+tags.
+If the
+.I tw
+and
+.I th
+values passed in are non-zero, then they are adjusted to reflect any
+compression-specific requirements. The returned width and height are
+constrained to be a multiple of 16 pixels to conform with the
+.SM TIFF
+specification.
+.PP
+.I TIFFTileSize
+returns the equivalent size for a tile of data as it would be returned in a
+call to
+.I TIFFReadTile
+or as it would be expected in a call to
+.IR TIFFWriteTile .
+.PP
+.I TIFFVTileSize
+returns the number of bytes in a row-aligned tile with
+.I nrows
+of data.
+.PP
+.I TIFFTileRowSize
+returns the number of bytes of a row of data in a tile.
+.PP
+.IR TIFFComputeTile
+returns the tile that contains the specified coordinates. A valid tile is
+always returned; out-of-range coordinate values are clamped to the bounds of
+the image. The
+.I x
+and
+.I y
+parameters are always used in calculating a tile. The
+.I z
+parameter is used if the image is deeper than 1 slice (\c
+.IR ImageDepth >1).
+The
+.I sample
+parameter is used only if data are organized in separate planes (\c
+.IR PlanarConfiguration =2).
+.PP
+.IR TIFFCheckTile
+returns a non-zero value if the supplied coordinates are within the bounds of
+the image and zero otherwise. The
+.I x
+parameter is checked against the value of the
+.I ImageWidth
+tag. The
+.I y
+parameter is checked against the value of the
+.I ImageLength
+tag. The
+.I z
+parameter is checked against the value of the
+.I ImageDepth
+tag (if defined). The
+.I sample
+parameter is checked against the value of the
+.I SamplesPerPixel
+parameter if the data are organized in separate planes.
+.PP
+.IR TIFFNumberOfTiles
+returns the number of tiles in the image.
+.SH DIAGNOSTICS
+None.
+.SH "SEE ALSO"
+.BR TIFFReadEncodedTile (3TIFF),
+.BR TIFFReadRawTile (3TIFF),
+.BR TIFFReadTile (3TIFF),
+.BR TIFFWriteEncodedTile (3TIFF),
+.BR TIFFWriteRawTile (3TIFF),
+.BR TIFFWriteTile (3TIFF),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/bmp2tiff.1 b/tiff/man/bmp2tiff.1
new file mode 100644
index 0000000..40eaafc
--- /dev/null
+++ b/tiff/man/bmp2tiff.1
@@ -0,0 +1,85 @@
+.\" $Id: bmp2tiff.1,v 1.7 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH BMP2TIFF 1 "15 October, 2004" "libtiff"
+.SH NAME
+bmp2tiff \- create a
+.SM TIFF
+file from a Microsoft Windows Device Independent Bitmap image file
+.SH SYNOPSIS
+.B bmp2tiff
+[
+.I options
+]
+.I input.bmp
+[
+.I input2.bmp ...\&
+]
+.I output.tiff
+.SH DESCRIPTION
+.I bmp2tiff
+converts a Microsoft Windows Device Independent Bitmap image file to
+.SM TIFF.
+If several input BMP files are being specified the multipage
+.SM TIFF
+output file will be created. By default, the
+.SM TIFF
+image is created with data samples packed (\c
+.IR PlanarConfiguration =1),
+compressed with the PackBits algorithm (\c
+.IR Compression =32773),
+and with each strip no more than 8 kilobytes.
+These characteristics can overridden, or explicitly specified
+with the options described below.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression,
+.B "\-c packbits"
+for the PackBits compression algorithm (the default),
+.B "\-c jpeg"
+for the baseline JPEG compression algorithm,
+.B "\-c zip"
+for the Deflate compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch.
+.TP
+.BI \-r " number"
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.SH "SEE ALSO"
+.BR gif2tiff (1),
+.BR pal2rgb (1),
+.BR ppm2tiff (1),
+.BR raw2tiff (1),
+.BR ras2tiff (1),
+.BR sgi2tiff (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/fax2ps.1 b/tiff/man/fax2ps.1
new file mode 100644
index 0000000..843dcd3
--- /dev/null
+++ b/tiff/man/fax2ps.1
@@ -0,0 +1,159 @@
+.\" $Id: fax2ps.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.ds Ps PostScript
+.if n .po 0
+.TH FAX2PS 1 "November 2, 2005" "libtiff"
+.SH NAME
+fax2ps \- convert a
+.SM TIFF
+facsimile to compressed \*(Ps\(tm
+.SH SYNOPSIS
+.B fax2ps
+[
+.I options
+] [
+.I file ...\&
+]
+.SH DESCRIPTION
+.I fax2ps
+reads one or more
+.SM TIFF
+facsimile image files and prints a compressed form of
+\*(Ps on the standard output that is suitable for printing.
+.PP
+By default, each page is scaled to reflect the
+image dimensions and resolutions stored in the file.
+The
+.B \-x
+and
+.B \-y
+options can be used to specify the horizontal and vertical
+image resolutions (lines/inch), respectively.
+If the
+.B \-S
+option is specified, each page is scaled to fill an output page.
+The default output page is 8.5 by 11 inches.
+Alternate page dimensions can be specified in inches with the
+.B \-W
+and
+.B \-H
+options.
+.PP
+By default
+.I fax2ps
+generates \*(Ps for all pages in the file.
+The
+.B \-p
+option can be used to select one or more pages from
+a multi-page document.
+.PP
+.I fax2ps
+generates a compressed form of \*(Ps that is
+optimized for sending pages of text to a \*(Ps
+printer attached to a host through a low-speed link (such
+as a serial line).
+Each output page is filled with white and then only
+the black areas are drawn.
+The \*(Ps specification of the black drawing operations
+is optimized by using a special font that encodes the
+move-draw operations required to fill
+the black regions on the page.
+This compression scheme typically results in a substantially
+reduced \*(Ps description, relative to the straightforward
+imaging of the page with a \*(Ps
+.I image
+operator.
+This algorithm can, however, be ineffective
+for continuous-tone and white-on-black images.
+For these images, it sometimes is more efficient to send
+the raster bitmap image directly; see
+.BR tiff2ps (1).
+.SH OPTIONS
+.TP 10
+.BI \-p " number"
+Print only the indicated page.
+Multiple pages may be printed by specifying
+this option more than once.
+.TP 10
+.BI \-x " resolution"
+Use
+.I resolution
+as the horizontal resolution, in dots/inch, of the image data.
+By default this value is taken from the file.
+.TP 10
+.BI \-y " resolution"
+Use
+.I resolution
+as the vertical resolution, in lines/inch, of the image data.
+By default this value is taken from the file.
+.TP 10
+.B \-S
+Scale each page of image data to fill the output page dimensions.
+By default images are presented according to the dimension
+information recorded in the
+.SM TIFF
+file.
+.TP 10
+.BI \-W " width"
+Use
+.I width
+as the width, in inches, of the output page.
+.TP 10
+.BI \-H " height"
+Use
+.I height
+as the height, in inches, of the output page.
+.SH DIAGNOSTICS
+Some messages about malformed
+.SM TIFF
+images come from the
+.SM TIFF
+library.
+.PP
+Various messages about badly formatted facsimile images
+may be generated due to transmission errors in received
+facsimile.
+.I fax2ps
+attempts to recover from such data errors by resynchronizing
+decoding at the end of the current scanline.
+This can result in long horizontal black lines in the resultant
+\*(Ps image.
+.SH NOTES
+If the destination printer supports \*(Ps Level II then
+it is always faster to just send the encoded bitmap generated
+by the
+.BR tiff2ps (1)
+program.
+.SH BUGS
+.I fax2ps
+should probably figure out when it is doing a poor
+job of compressing the output and just generate
+\*(Ps to image the bitmap raster instead.
+.SH "SEE ALSO"
+.BR tiff2ps (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/fax2tiff.1 b/tiff/man/fax2tiff.1
new file mode 100644
index 0000000..1ac4d7d
--- /dev/null
+++ b/tiff/man/fax2tiff.1
@@ -0,0 +1,286 @@
+.\" $Id: fax2tiff.1,v 1.7 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1990-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH FAX2TIFF 1 "November 2, 2005" "libtiff"
+.SH NAME
+fax2tiff \- create a
+.SM TIFF
+Class F fax file from raw fax data
+.SH SYNOPSIS
+.B fax2tiff
+[
+.I options
+] [
+.B \-o
+.I output.tif
+]
+.I input.raw
+.SH DESCRIPTION
+.I Fax2tiff
+creates a
+.SM TIFF
+file containing
+.SM CCITT
+Group 3 or Group 4 encoded data from one or more files containing ``raw''
+Group 3 or Group 4 encoded data (typically obtained directly from a fax modem).
+By default, each row of data in the resultant
+.SM TIFF
+file is 1-dimensionally encoded and
+padded or truncated to 1728 pixels, as needed.
+The resultant image is a set of low resolution (98 lines/inch)
+or medium resolution (196 lines/inch)
+pages, each of which is a single strip of data.
+The generated file conforms to the
+.SM TIFF
+Class F (\c
+.SM FAX\c
+) specification for storing facsimile data.
+This means, in particular, that each page of the data does
+.B not
+include the trailing
+.I "return to control"
+(\c
+.SM RTC\c
+) code; as required
+for transmission by the
+.SM CCITT
+Group 3 specifications.
+The old, ``classic'', format is created if the
+.B \-c
+option is used.
+(The Class F format can also be requested with the
+.B \-f
+option.)
+.PP
+The default name of the output image is
+.IR fax.tif ;
+this can be changed with the
+.B \-o
+option.
+Each input file is assumed to be a separate page of facsimile data
+from the same document.
+The order in which input files are specified on the command
+line is the order in which the resultant pages appear in the
+output file.
+.SH OPTIONS
+Options that affect the interpretation of input data are:
+.TP
+.B \-3
+Assume input data is
+.SM CCITT
+Group 3 encoded (default).
+.TP
+.B \-4
+Assume input data is
+.SM CCITT
+Group 4 encoded.
+.TP
+.B \-U
+Assume input data is uncompressed (Group 3 or Group 4).
+.TP
+.B \-1
+Assume input data is encoded with the 1-dimensional version of the
+.SM CCITT
+Group 3 Huffman encoding algorithm (default).
+.TP
+.B \-2
+Assume input data is 2-dimensional version of the
+.SM CCITT
+Group 3 Huffman encoding algorithm.
+.TP
+.B \-P
+Assume input data is
+.B not
+EOL-aligned (default). This option has effect with Group 3 encoded input only.
+.TP
+.B \-A
+Assume input data is EOL-aligned. This option has effect with Group 3
+encoded input only.
+.TP
+.B \-M
+Treat input data as having bits filled from most significant bit (\c
+.SM MSB\c
+) to most least bit (\c
+.SM LSB\c
+).
+.TP
+.B \-L
+Treat input data as having bits filled from least significant bit (\c
+.SM LSB\c
+) to most significant bit (\c
+.SM MSB\c
+) (default).
+.TP
+.B \-B
+Assume input data was encoded with black as 0 and white as 1.
+.TP
+.B \-W
+Assume input data was encoded with black as 1 and white as 0 (default).
+.TP
+.B \-R
+Specify the vertical resolution, in lines/inch, of the input images.
+By default input are assumed to have a vertical resolution of 196 lines/inch.
+If images are low resolution facsimile, a value of 98 lines/inch should
+be specified.
+.TP
+.B \-X
+Specify the width, in pixels, of the input images.
+By default input are assumed to have a width of 1728 pixels.
+.PP
+Options that affect the output file format are:
+.TP
+.B \-o
+Specify the name of the output file.
+.TP
+.B \-7
+Force output to be compressed with the
+.SM CCITT
+Group 3 Huffman encoding algorithm (default).
+.TP
+.B \-8
+Force output to be compressed with the
+.SM CCITT
+Group 4 Huffman encoding.
+.TP
+.B \-u
+Force output to be uncompressed (Group 3 or Group 4).
+.TP
+.B \-5
+Force output to be encoded with the 1-dimensional version of the
+.SM CCITT
+Group 3 Huffman encoding algorithm.
+.TP
+.B \-6
+Force output to be encoded with the 2-dimensional version of the
+.SM CCITT
+Group 3 Huffman encoding algorithm (default).
+.TP
+.B \-a
+Force the last bit of each
+.I "End Of Line"
+(\c
+.SM EOL\c
+) code to land on a byte boundary (default). This ``zero padding'' will
+be reflected in the contents of the
+.I Group3Options
+tag of the resultant
+.SM TIFF
+file. This option has effect with Group 3 encoded output only.
+.TP
+.B \-p
+Do not EOL-align output. This option has effect with Group 3 encoded
+output only.
+.TP
+.B \-c
+Generate "classic" Group 3 TIFF format.
+.TP
+.B \-f
+Generate TIFF Class F (TIFF/F) format (default).
+.TP
+.B \-m
+Force output data to have bits filled from most significant bit (\c
+.SM MSB\c
+) to most least bit (\c
+.SM LSB\c
+).
+.TP
+.B \-l
+Force output data to have bits filled from least significant bit (\c
+.SM LSB\c
+) to most significant bit (\c
+.SM MSB\c
+) (default).
+.TP
+.B \-r
+Specify the number of rows (scanlines) in each strip of data
+written to the output file.
+By default (or when value
+.B 0
+is specified),
+.I tiffcp
+attempts to set the rows/strip
+that no more than 8 kilobytes of data appear in a strip (with except of G3/G4
+compression schemes). If you specify special value
+.B \-1
+it will results in infinite number of the rows per strip. The entire image
+will be the one strip in that case. This is default in case of G3/G4 output
+compression schemes.
+.TP
+.B \-s
+Stretch the input image vertically by writing each input row of
+data twice to the output file.
+.TP
+.B \-v
+Force
+.I fax2tiff
+to print the number of rows of data it retrieved from the input file.
+.TP
+.B \-z
+Force output to be compressed with the LZW encoding.
+.SH DIAGNOSTICS
+The following warnings and errors come from the decoding
+routines in the library.
+.PP
+.BR "Warning, %s: Premature EOL at scanline %d (x %d).\en" .
+The input data had a row that was shorter than the expected width.
+The row is padded with white.
+.PP
+.BR "%s: Premature EOF at scanline %d (x %d).\en" .
+The decoder ran out of data in the middle of a scanline.
+The resultant row is padded with white.
+.PP
+.BR "%s: Bad code word at row %d, x %d\en" .
+An invalid Group 3
+.I code
+was encountered while decoding the input file.
+The row number and horizontal position is given.
+The remainder of the input row is discarded, while
+the corresponding output row is padded with white.
+.PP
+.BR "%s: Bad 2D code word at scanline %d.\en" .
+An invalid Group 4 or 2D Group 3
+.I code
+was encountered while decoding the input file.
+The row number and horizontal position is given.
+The remainder of the input row is discarded, while
+the corresponding output row is padded with white.
+.SH BUGS
+Input data are assumed to have a a ``top left'' orientation;
+it should be possible to override this assumption
+from the command line.
+.SH "SEE ALSO"
+.BR "\s-1CCITT\s+1 Recommendation T.4"
+(Standardization of Group 3 Facsimile Apparatus for Document Transmission).
+.PP
+.BR "The Spirit of TIFF Class F",
+an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
+.PP
+.BR tiffinfo (1),
+.BR tiffdither (1),
+.BR tiffgt (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/gif2tiff.1 b/tiff/man/gif2tiff.1
new file mode 100644
index 0000000..14e33dd
--- /dev/null
+++ b/tiff/man/gif2tiff.1
@@ -0,0 +1,81 @@
+.\" $Id: gif2tiff.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH GIF2TIFF 1 "November 2, 2005" "libtiff"
+.SH NAME
+gif2tiff \- create a
+.SM TIFF
+file from a GIF87 format image file
+.SH SYNOPSIS
+.B gif2tiff
+[
+.I options
+]
+.I input.gif
+.I output.tif
+.SH DESCRIPTION
+.I Gif2tiff
+converts a file in the GIF87 format to
+.SM TIFF.
+The
+.SM TIFF
+image is created as a palette image, with samples
+compressed with the Lempel-Ziv & Welch algorithm (\c
+.IR Compression =5).
+These characteristics can overridden, or explicitly specified
+with the options described below.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression,
+.B "\-c packbits"
+for the PackBits compression algorithm,
+.B "\-c zip"
+for the Deflate compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch (the default).
+.TP
+.B \-r
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.SH NOTES
+The program is based on Paul Haeberli's
+.I fromgif
+program which, in turn, is based on Marcel J.E. Mol's GIF reader.
+.SH BUGS
+Should have more options to control output format.
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/libtiff.3tiff b/tiff/man/libtiff.3tiff
new file mode 100644
index 0000000..0d8885f
--- /dev/null
+++ b/tiff/man/libtiff.3tiff
@@ -0,0 +1,536 @@
+.\" $Id: libtiff.3tiff,v 1.3 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH INTRO 3TIFF "November 2, 2005" "libtiff"
+.SH NAME
+libtiff \- introduction to
+.IR libtiff ,
+a library for reading and writing
+.SM TIFF
+files
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+cc file.c
+.B -ltiff
+.SH DESCRIPTION
+.I libtiff
+is a library for reading and writing data files encoded with the
+.I "Tag Image File"
+format, Revision 6.0 (or revision 5.0 or revision 4.0). This file format is
+suitable for archiving multi-color and monochromatic image data.
+.PP
+The library supports several compression algorithms, as indicated by the
+.I Compression
+field, including:
+no compression (1),
+.SM CCITT
+1D Huffman compression (2),
+.SM CCITT
+Group 3 Facsimile compression (3),
+.SM CCITT
+Group 4 Facsimile compression (4),
+Lempel-Ziv & Welch compression (5),
+baseline JPEG compression (7),
+word-aligned 1D Huffman compression (32771),
+and
+PackBits compression (32773).
+In addition, several nonstandard compression algorithms are supported: the
+4-bit compression algorithm used by the
+.I ThunderScan
+program (32809) (decompression only), NeXT's 2-bit compression algorithm
+(32766) (decompression only), an experimental LZ-style algorithm known as
+Deflate (32946), and an experimental CIE LogLuv compression scheme designed
+for images with high dynamic range (32845 for LogL and 32845 for LogLuv).
+Directory information may be in either little- or big-endian byte order\-byte
+swapping is automatically done by the library. Data bit ordering may be either
+Most Significant Bit (\c
+.SM MSB\c
+) to Least Significant Bit (\c
+.SM LSB\c
+) or
+.SM LSB
+to
+.SM MSB.
+Finally, the library does not support files in which the
+.IR BitsPerSample ,
+.IR Compression ,
+.IR MinSampleValue ,
+or
+.IR MaxSampleValue
+fields are defined differently on a per-sample basis
+(in Rev. 6.0 the
+.I Compression
+tag is not defined on a per-sample basis, so this is immaterial).
+.SH "DATA TYPES"
+The library makes extensive use of C typedefs to promote portability.
+Two sets of typedefs are used, one for communication with clients
+of the library and one for internal data structures and parsing of the
+.SM TIFF
+format.
+The following typedefs are exposed to users either through function
+definitions or through parameters passed through the varargs interfaces.
+.in +.5i
+.sp 5p
+.ta +\w'typedef unsigned <\fIthing\fP> uint32; 'u
+.nf
+typedef unsigned short uint16; 16-bit unsigned integer
+typedef unsigned <\fIthing\fP> uint32; 32-bit unsigned integer
+.sp 5p
+typedef unsigned int ttag_t; directory tag
+typedef uint16 tdir_t; directory index
+typedef uint16 tsample_t; sample number
+typedef uint32 tstrip_t; strip number
+typedef uint32 ttile_t; tile number
+typedef int32 tsize_t; i/o size in bytes
+typedef void* tdata_t; image data ref
+typedef void* thandle_t; client data handle
+typedef int32 toff_t; file offset
+.fi
+.sp 5p
+.in -.5i
+Note that
+.IR tstrip_t ,
+.IR ttile_t ,
+and
+.I tsize_t
+are constrained to be no more than 32-bit quantities by 32-bit fields they are
+stored in in the
+.SM TIFF
+image.
+Likewise
+.I tsample_t
+is limited by the 16-bit field used to store the
+.I SamplesPerPixel
+tag.
+.I tdir_t
+constrains the maximum number of
+.SM IFDs
+that may appear in an image and may be an arbitrary size (w/o penalty).
+.I ttag_t
+must be either int, unsigned int, pointer, or double because the library uses
+a varargs interface and
+.SM "ANSI C"
+restricts the type of the parameter before an ellipsis to be a promoted type.
+.I toff_t
+is defined as int32 because TIFF file offsets are (unsigned) 32-bit
+quantities. A signed value is used because some interfaces return \-1 on
+error. Finally, note that user-specified data references are passed as opaque
+handles and only cast at the lowest layers where their type is presumed.
+.SH "LIST OF ROUTINES"
+The following routines are part of the library. Consult specific manual pages
+for details on their operation; on most systems doing ``man function-name''
+will work.
+.sp
+.nf
+.ta \w'TIFFCheckpointDirectory'u+2n
+\fIName\fP \fIDescription\fP
+.sp 5p
+TIFFCheckpointDirectory writes the current state of the directory
+TIFFCheckTile very x,y,z,sample is within image
+TIFFCIELabToRGBInit initialize CIE L*a*b* 1976 to RGB conversion state
+TIFFCIELabToXYZ perform CIE L*a*b* 1976 to CIE XYZ conversion
+TIFFClientOpen open a file for reading or writing
+TIFFClose close an open file
+TIFFComputeStrip return strip containing y,sample
+TIFFComputeTile return tile containing x,y,z,sample
+TIFFCurrentDirectory return index of current directory
+TIFFCurrentRow return index of current scanline
+TIFFCurrentStrip return index of current strip
+TIFFCurrentTile return index of current tile
+TIFFDataWidth return the size of TIFF data types
+TIFFError library error handler
+TIFFFdOpen open a file for reading or writing
+TIFFFileName return name of open file
+TIFFFileno return open file descriptor
+TIFFFindCODEC find standard codec for the specific scheme
+TIFFFlush flush all pending writes
+TIFFFlushData flush pending data writes
+TIFFGetBitRevTable return bit reversal table
+TIFFGetField return tag value in current directory
+TIFFGetFieldDefaulted return tag value in current directory
+TIFFGetMode return open file mode
+TIFFGetVersion return library version string
+TIFFIsCODECConfigured check, whether we have working codec
+TIFFIsMSB2LSB return true if image data is being returned
+ with bit 0 as the most significant bit
+TIFFIsTiled return true if image data is tiled
+TIFFIsByteSwapped return true if image data is byte-swapped
+TIFFNumberOfStrips return number of strips in an image
+TIFFNumberOfTiles return number of tiles in an image
+TIFFOpen open a file for reading or writing
+TIFFPrintDirectory print description of the current directory
+TIFFReadBufferSetup specify i/o buffer for reading
+TIFFReadDirectory read the next directory
+TIFFReadEncodedStrip read and decode a strip of data
+TIFFReadEncodedTile read and decode a tile of data
+TIFFReadRawStrip read a raw strip of data
+TIFFReadRawTile read a raw tile of data
+TIFFReadRGBAImage read an image into a fixed format raster
+TIFFReadScanline read and decode a row of data
+TIFFReadTile read and decode a tile of data
+TIFFRegisterCODEC override standard codec for the specific scheme
+TIFFReverseBits reverse bits in an array of bytes
+TIFFRGBAImageBegin setup decoder state for TIFFRGBAImageGet
+TIFFRGBAImageEnd release TIFFRGBAImage decoder state
+TIFFRGBAImageGet read and decode an image
+TIFFRGBAImageOK is image readable by TIFFRGBAImageGet
+TIFFScanlineSize return size of a scanline
+TIFFSetDirectory set the current directory
+TIFFSetSubDirectory set the current directory
+TIFFSetErrorHandler set error handler function
+TIFFSetField set a tag's value in the current directory
+TIFFSetWarningHandler set warning handler function
+TIFFStripSize returns size of a strip
+TIFFRawStripSize returns the number of bytes in a raw strip
+TIFFSwabShort swap bytes of short
+TIFFSwabLong swap bytes of long
+TIFFSwabArrayOfShort swap bytes of an array of shorts
+TIFFSwabArrayOfLong swap bytes of an array of longs
+TIFFTileRowSize return size of a row in a tile
+TIFFTileSize return size of a tile
+TIFFUnRegisterCODEC unregisters the codec
+TIFFVGetField return tag value in current directory
+TIFFVGetFieldDefaulted return tag value in current directory
+TIFFVSetField set a tag's value in the current directory
+TIFFVStripSize returns the number of bytes in a strip
+TIFFWarning library warning handler
+TIFFWriteDirectory write the current directory
+TIFFWriteEncodedStrip compress and write a strip of data
+TIFFWriteEncodedTile compress and write a tile of data
+TIFFWriteRawStrip write a raw strip of data
+TIFFWriteRawTile write a raw tile of data
+TIFFWriteScanline write a scanline of data
+TIFFWriteTile compress and write a tile of data
+TIFFXYZToRGB perform CIE XYZ to RGB conversion
+TIFFYCbCrToRGBInit initialize YCbCr to RGB conversion state
+TIFFYCbCrtoRGB perform YCbCr to RGB conversion
+.sp
+Auxiliary functions:
+_TIFFfree free memory buffer
+_TIFFmalloc dynamically allocate memory buffer
+_TIFFmemcmp compare contents of the memory buffers
+_TIFFmemcpy copy contents of the one buffer to another
+_TIFFmemset fill memory buffer with a constant byte
+_TIFFrealloc dynamically reallocate memory buffer
+
+.fi
+.SH "TAG USAGE"
+The table below lists the
+.SM TIFF
+tags that are recognized and handled by the library.
+If no use is indicated in the table, then the library
+reads and writes the tag, but does not use it internally.
+Note that some tags are meaningful only when a particular
+compression scheme is being used; e.g.
+.I Group3Options
+is only useful if
+.I Compression
+is set to
+.SM CCITT
+Group 3 encoding.
+Tags of this sort are considered
+.I codec-specific
+tags and the library does not recognize them except when the
+.I Compression
+tag has been previously set to the relevant compression scheme.
+.sp
+.nf
+.ta \w'TIFFTAG_JPEGTABLESMODE'u+2n +\w'Value'u+2n +\w'R/W'u+2n
+\fITag Name\fP \fIValue\fP \fIR/W\fP \fILibrary Use/Notes\fP
+.sp 5p
+.nf
+Artist 315 R/W
+BadFaxLines 326 R/W
+BitsPerSample 258 R/W lots
+CellLength 265 parsed but ignored
+CellWidth 264 parsed but ignored
+CleanFaxData 327 R/W
+ColorMap 320 R/W
+ColorResponseUnit 300 parsed but ignored
+Compression 259 R/W choosing codec
+ConsecutiveBadFaxLines 328 R/W
+Copyright 33432 R/W
+DataType 32996 R obsoleted by SampleFormat tag
+DateTime 306 R/W
+DocumentName 269 R/W
+DotRange 336 R/W
+ExtraSamples 338 R/W lots
+FaxRecvParams 34908 R/W
+FaxSubAddress 34909 R/W
+FaxRecvTime 34910 R/W
+FillOrder 266 R/W control bit order
+FreeByteCounts 289 parsed but ignored
+FreeOffsets 288 parsed but ignored
+GrayResponseCurve 291 parsed but ignored
+GrayResponseUnit 290 parsed but ignored
+Group3Options 292 R/W used by Group 3 codec
+Group4Options 293 R/W
+HostComputer 316 R/W
+ImageDepth 32997 R/W tile/strip calculations
+ImageDescription 270 R/W
+ImageLength 257 R/W lots
+ImageWidth 256 R/W lots
+InkNames 333 R/W
+InkSet 332 R/W
+JPEGTables 347 R/W used by JPEG codec
+Make 271 R/W
+Matteing 32995 R obsoleted by ExtraSamples tag
+MaxSampleValue 281 R/W
+MinSampleValue 280 R/W
+Model 272 R/W
+NewSubFileType 254 R/W called SubFileType in spec
+NumberOfInks 334 R/W
+Orientation 274 R/W
+PageName 285 R/W
+PageNumber 297 R/W
+PhotometricInterpretation 262 R/W used by Group 3 and JPEG codecs
+PlanarConfiguration 284 R/W data i/o
+Predictor 317 R/W used by LZW and Deflate codecs
+PrimaryChromacities 319 R/W
+ReferenceBlackWhite 532 R/W
+ResolutionUnit 296 R/W used by Group 3 codec
+RowsPerStrip 278 R/W data i/o
+SampleFormat 339 R/W
+SamplesPerPixel 277 R/W lots
+SMinSampleValue 340 R/W
+SMaxSampleValue 341 R/W
+Software 305 R/W
+StoNits 37439 R/W
+StripByteCounts 279 R/W data i/o
+StripOffsets 273 R/W data i/o
+SubFileType 255 R/W called OSubFileType in spec
+TargetPrinter 337 R/W
+Thresholding 263 R/W
+TileByteCounts 324 R/W data i/o
+TileDepth 32998 R/W tile/strip calculations
+TileLength 323 R/W data i/o
+TileOffsets 324 R/W data i/o
+TileWidth 322 R/W data i/o
+TransferFunction 301 R/W
+WhitePoint 318 R/W
+XPosition 286 R/W
+XResolution 282 R/W
+YCbCrCoefficients 529 R/W used by TIFFRGBAImage support
+YCbCrPositioning 531 R/W tile/strip size calulcations
+YCbCrSubsampling 530 R/W
+YPosition 286 R/W
+YResolution 283 R/W used by Group 3 codec
+.SH "PSEUDO TAGS"
+In addition to the normal
+.SM TIFF
+tags the library supports a collection of
+tags whose values lie in a range outside the valid range of
+.SM TIFF
+tags.
+These tags are termed
+.I pseud-tags
+and are used to control various codec-specific functions within the library.
+The table below summarizes the defined pseudo-tags.
+.sp
+.nf
+.ta \w'TIFFTAG_JPEGTABLESMODE'u+2n +\w'Codec'u+2n +\w'R/W'u+2n
+\fITag Name\fP \fICodec\fP \fIR/W\fP \fILibrary Use/Notes\fP
+.sp 5p
+.nf
+TIFFTAG_FAXMODE G3 R/W general codec operation
+TIFFTAG_FAXFILLFUNC G3/G4 R/W bitmap fill function
+TIFFTAG_JPEGQUALITY JPEG R/W compression quality control
+TIFFTAG_JPEGCOLORMODE JPEG R/W control colorspace conversions
+TIFFTAG_JPEGTABLESMODE JPEG R/W control contents of \fIJPEGTables\fP tag
+TIFFTAG_ZIPQUALITY Deflate R/W compression quality level
+TIFFTAG_PIXARLOGDATAFMT PixarLog R/W user data format
+TIFFTAG_PIXARLOGQUALITY PixarLog R/W compression quality level
+TIFFTAG_SGILOGDATAFMT SGILog R/W user data format
+.fi
+.TP
+.B TIFFTAG_FAXMODE
+Control the operation of the Group 3 codec.
+Possible values (independent bits that can be combined by
+or'ing them together) are:
+FAXMODE_CLASSIC
+(enable old-style format in which the
+.SM RTC
+is written at the end of the last strip),
+FAXMODE_NORTC
+(opposite of
+FAXMODE_CLASSIC;
+also called
+FAXMODE_CLASSF),
+FAXMODE_NOEOL
+(do not write
+.SM EOL
+codes at the start of each row of data),
+FAXMODE_BYTEALIGN
+(align each encoded row to an 8-bit boundary),
+FAXMODE_WORDALIGN
+(align each encoded row to an 16-bit boundary),
+The default value is dependent on the compression scheme; this
+pseudo-tag is used by the various G3 and G4 codecs to share code.
+.TP
+.B TIFFTAG_FAXFILLFUNC
+Control the function used to convert arrays of black and white
+runs to packed bit arrays.
+This hook can be used to image decoded scanlines in multi-bit
+depth rasters (e.g. for display in colormap mode)
+or for other purposes.
+The default value is a pointer to a builtin function that images
+packed bilevel data.
+.TP
+.B TIFFTAG_IPTCNEWSPHOTO
+Tag contaings image metadata per the IPTC newsphoto spec: Headline,
+captioning, credit, etc... Used by most wire services.
+.TP
+.B TIFFTAG_PHOTOSHOP
+Tag contains Photoshop captioning information and metadata. Photoshop
+uses in parallel and redundantly alongside IPTCNEWSPHOTO information.
+.TP
+.B TIFFTAG_JPEGQUALITY
+Control the compression quality level used in the baseline algorithm.
+Note that quality levels are in the range 0-100 with a default value of 75.
+.TP
+.B TIFFTAG_JPEGCOLORMODE
+Control whether or not conversion is done between
+RGB and YCbCr colorspaces.
+Possible values are:
+JPEGCOLORMODE_RAW
+(do not convert), and
+JPEGCOLORMODE_RGB
+(convert to/from RGB)
+The default value is JPEGCOLORMODE_RAW.
+.TP
+.B TIFFTAG_JPEGTABLESMODE
+Control the information written in the
+.I JPEGTables
+tag.
+Possible values (independent bits that can be combined by
+or'ing them together) are:
+JPEGTABLESMODE_QUANT
+(include quantization tables),
+and
+JPEGTABLESMODE_HUFF
+(include Huffman encoding tables).
+The default value is JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF.
+.TP
+.B TIFFTAG_ZIPQUALITY
+Control the compression technique used by the Deflate codec.
+Quality levels are in the range 1-9 with larger numbers yielding better
+compression at the cost of more computation.
+The default quality level is 6 which yields a good time-space tradeoff.
+.TP
+.B TIFFTAG_PIXARLOGDATAFMT
+Control the format of user data passed
+.I in
+to the PixarLog codec when encoding and passed
+.I out
+from when decoding.
+Possible values are:
+PIXARLOGDATAFMT_8BIT
+for 8-bit unsigned pixels,
+PIXARLOGDATAFMT_8BITABGR
+for 8-bit unsigned ABGR-ordered pixels,
+PIXARLOGDATAFMT_11BITLOG
+for 11-bit log-encoded raw data,
+PIXARLOGDATAFMT_12BITPICIO
+for 12-bit PICIO-compatible data,
+PIXARLOGDATAFMT_16BIT
+for 16-bit signed samples,
+and
+PIXARLOGDATAFMT_FLOAT
+for 32-bit IEEE floating point samples.
+.TP
+.B TIFFTAG_PIXARLOGQUALITY
+Control the compression technique used by the PixarLog codec.
+This value is treated identically to TIFFTAG_ZIPQUALITY; see the
+above description.
+.TP
+.B TIFFTAG_SGILOGDATAFMT
+Control the format of client data passed
+.I in
+to the SGILog codec when encoding and passed
+.I out
+from when decoding.
+Possible values are:
+SGILOGDATAFMT_FLTXYZ
+for converting between LogLuv and 32-bit IEEE floating valued XYZ pixels,
+SGILOGDATAFMT_16BITLUV
+for 16-bit encoded Luv pixels,
+SGILOGDATAFMT_32BITRAW and SGILOGDATAFMT_24BITRAW
+for no conversion of data,
+SGILOGDATAFMT_8BITRGB
+for returning 8-bit RGB data (valid only when decoding LogLuv-encoded data),
+SGILOGDATAFMT_FLTY
+for converting between LogL and 32-bit IEEE floating valued Y pixels,
+SGILOGDATAFMT_16BITL
+for 16-bit encoded L pixels,
+and
+SGILOGDATAFMT_8BITGRY
+for returning 8-bit greyscale data
+(valid only when decoding LogL-encoded data).
+.SH DIAGNOSTICS
+All error messages are directed through the
+.IR TIFFError
+routine.
+By default messages are directed to
+.B stderr
+in the form:
+.IR "module: message\en."
+Warning messages are likewise directed through the
+.IR TIFFWarning
+routine.
+.SH "SEE ALSO"
+.BR fax2tiff (1),
+.BR gif2tiff (1),
+.BR pal2rgb (1),
+.BR ppm2tiff (1),
+.BR rgb2ycbcr (1),
+.BR ras2tiff (1),
+.BR raw2tiff (1),
+.BR sgi2tiff (1),
+.BR tiff2bw (1),
+.BR tiffdither (1),
+.BR tiffdump (1),
+.BR tiffcp (1),
+.BR tiffcmp (1),
+.BR tiffgt (1),
+.BR tiffinfo (1),
+.BR tiffmedian (1),
+.BR tiffsplit (1),
+.BR tiffsv (1).
+.PP
+.BR "Tag Image File Format Specification \(em Revision 6.0" ,
+an Aldus Technical Memorandum.
+.PP
+.BR "The Spirit of TIFF Class F" ,
+an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
+.SH BUGS
+The library does not support multi-sample images
+where some samples have different bits/sample.
+.PP
+The library does not support random access to compressed data
+that is organized with more than one row per tile or strip.
diff --git a/tiff/man/pal2rgb.1 b/tiff/man/pal2rgb.1
new file mode 100644
index 0000000..8dd87ac
--- /dev/null
+++ b/tiff/man/pal2rgb.1
@@ -0,0 +1,111 @@
+.\" $Id: pal2rgb.1,v 1.3 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1990-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH PAL2RGB 1 "September 20, 2005" "libtiff"
+.SH NAME
+pal2rgb \- convert a palette color
+.SM TIFF
+image to a full color image
+.SH SYNOPSIS
+.B pal2rgb
+[
+.I options
+]
+.I input.tif
+.I output.tif
+.SH DESCRIPTION
+.I Pal2rgb
+converts a palette color
+.SM TIFF
+image to a full color image by
+applying the colormap of the palette image to each sample
+to generate a full color
+.SM RGB
+image.
+.SH OPTIONS
+Options that affect the interpretation of input data are:
+.TP
+.B \-C
+This option overrides the default behavior of
+.I pal2rgb
+in determining whether or not
+colormap entries contain 16-bit or 8-bit values.
+By default the colormap is inspected and
+if no colormap entry greater than 255 is found,
+the colormap is assumed to have only 8-bit values; otherwise
+16-bit values (as required by the
+.SM TIFF
+specification) are assumed.
+The
+.B \-C
+option can be used to explicitly specify the number of
+bits for colormap entries:
+.B "\-C 8"
+for 8-bit values,
+.B "\-C 16"
+for 16-bit values.
+.PP
+Options that affect the output file format are:
+.TP
+.B \-p
+Explicitly select the planar configuration used in organizing
+data samples in the output image:
+.B "\-p contig"
+for samples packed contiguously, and
+.B "\-p separate"
+for samples stored separately.
+By default samples are packed.
+.TP
+.B \-c
+Use the specific compression algorithm to encoded image data
+in the output file:
+.B "\-c packbits"
+for Macintosh Packbits,
+.B "\-c lzw"
+for Lempel-Ziv & Welch,
+.B "\-c zip"
+for Deflate,
+.B "\-c none"
+for no compression.
+If no compression-related option is specified, the input
+file's compression algorithm is used.
+.TP
+.B \-r
+Explicitly specify the number of rows in each strip of the
+output file.
+If the
+.B \-r
+option is not specified, a number is selected such that each
+output strip has approximately 8 kilobytes of data in it.
+.SH BUGS
+Only 8-bit images are handled.
+.SH "SEE ALSO"
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/ppm2tiff.1 b/tiff/man/ppm2tiff.1
new file mode 100644
index 0000000..b951444
--- /dev/null
+++ b/tiff/man/ppm2tiff.1
@@ -0,0 +1,105 @@
+.\" $Id: ppm2tiff.1,v 1.5 2006/03/01 11:20:33 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH PPM2TIFF 1 "March 1, 2006" "libtiff"
+.SH NAME
+ppm2tiff \- create a
+.SM TIFF
+file from
+.SM PPM, PGM
+and
+.SM PBM
+image files
+.SH SYNOPSIS
+.B ppm2tiff
+[
+.I options
+] [
+.I input.ppm
+]
+.I output.tif
+.SH DESCRIPTION
+.I ppm2tiff
+converts a file in the
+.SM PPM, PGM
+and
+.SM PBM
+image formats to
+.SM TIFF.
+By default, the
+.SM TIFF
+image is created with data samples packed (\c
+.IR PlanarConfiguration =1),
+compressed with the Packbits algorithm (\c
+.IR Compression =32773),
+and with each strip no more than 8 kilobytes. These characteristics can be
+overridden, or explicitly specified with the options described below
+.PP
+If the
+.SM PPM
+file contains greyscale data, then the
+.I PhotometricInterpretation
+tag is set to 1 (min-is-black), otherwise it is set to 2 (RGB).
+.PP
+If no
+.SM PPM
+file is specified on the command line,
+.I ppm2tiff
+will read from the standard input.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B none
+for no compression,
+.B packbits
+for PackBits compression (will be used by default),
+.B lzw
+for Lempel-Ziv & Welch compression,
+.B jpeg
+for baseline JPEG compression,
+.B zip
+for Deflate compression,
+.B g3
+for CCITT Group 3 (T.4) compression,
+and
+.B g4
+for CCITT Group 4 (T.6) compression.
+.TP
+.B \-r
+Write data with a specified number of rows per strip; by default the number of
+rows/strip is selected so that each strip is approximately 8 kilobytes.
+.TP
+.B \-R
+Mark the resultant image to have the specified X and Y resolution (in
+dots/inch).
+.SH "SEE ALSO"
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/ras2tiff.1 b/tiff/man/ras2tiff.1
new file mode 100644
index 0000000..a2c40c7
--- /dev/null
+++ b/tiff/man/ras2tiff.1
@@ -0,0 +1,96 @@
+.\" $Id: ras2tiff.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1990-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH RAS2TIFF 1 "November 2, 2005" "libtiff"
+.SH NAME
+ras2tiff \- create a
+.SM TIFF
+file from a Sun rasterfile
+.SH SYNOPSIS
+.B ras2tiff
+[
+.I options
+]
+.I input.ras
+.I output.tif
+.SH DESCRIPTION
+.I ras2tiff
+converts a file in the Sun rasterfile format to
+.SM TIFF.
+By default, the
+.SM TIFF
+image is created with data samples packed (\c
+.IR PlanarConfiguration =1),
+compressed with the Lempel-Ziv & Welch algorithm (\c
+.IR Compression =5),
+and with each strip no more than 8 kilobytes.
+These characteristics can overridden, or explicitly specified
+with the options described below.
+.PP
+Any colormap information in the rasterfile is carried over to the
+.SM TIFF
+file by including a
+.I Colormap
+tag in the output file.
+If the rasterfile has a colormap, the
+.I PhotometricInterpretation
+tag is set to 3 (palette);
+otherwise it is set to 2 (RGB) if the depth
+is 24 or 1 (min-is-black) if the depth is not 24.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression,
+.B "\-c packbits"
+for the PackBits compression algorithm,
+.B "\-c jpeg"
+for the baseline JPEG compression algorithm,
+.B "\-c zip
+for the Deflate compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch (the default).
+.TP
+.B \-r
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.SH BUGS
+Does not handle all possible rasterfiles.
+In particular,
+.I ras2tiff
+does not handle run-length encoded images.
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
+
diff --git a/tiff/man/raw2tiff.1 b/tiff/man/raw2tiff.1
new file mode 100644
index 0000000..dc47b9e
--- /dev/null
+++ b/tiff/man/raw2tiff.1
@@ -0,0 +1,196 @@
+.\" $Id: raw2tiff.1,v 1.6 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1990-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH RAW2TIFF 1 "November 2, 2005" "libtiff"
+.SH NAME
+raw2tiff \- create a
+.SM TIFF
+file from a raw data
+.SH SYNOPSIS
+.B raw2tiff
+[
+.I options
+]
+.I input.raw
+.I output.tif
+.SH DESCRIPTION
+.I raw2tiff
+converts a raw byte sequence into
+.SM TIFF.
+By default, the
+.SM TIFF
+image is created with data samples packed (\c
+.IR PlanarConfiguration =1),
+compressed with the PackBits algorithm (\c
+.IR Compression =32773),
+and with each strip no more than 8 kilobytes.
+These characteristics can overridden, or explicitly specified
+with the options described below.
+.SH OPTIONS
+.TP
+.BI \-H " number"
+size of input image file header in bytes (0 by default). This amount of data
+just will be skipped from the start of file while reading.
+.TP
+.BI \-w " number"
+width of input image in pixels (can be guessed, see
+.SM
+.B "GUESSING THE IMAGE GEOMETRY"
+below).
+.TP
+.BI \-l " number"
+length of input image in lines (can be guessed, see
+.SM
+.B "GUESSING THE IMAGE GEOMETRY"
+below).
+.TP
+.BI \-b " number"
+number of bands in input image (1 by default).
+.TP
+.BI \-d " data_type"
+type of samples in input image, where
+.I data_type
+may be:
+.ta \w'\fBdouble \fR'u
+.br
+.B byte\t
+8-bit unsigned integer (default),
+.br
+.B short\t
+16-bit unsigned integer,
+.br
+.B long\t
+32-bit unsigned integer,
+.br
+.B sbyte\t
+8-bit signed integer,
+.br
+.B sshort\t
+16-bit signed integer,
+.br
+.B slong\t
+32-bit signed integer,
+.br
+.B float\t
+32-bit IEEE floating point,
+.br
+.B double\t
+64-bit IEEE floating point.
+.TP
+.BI \-i " config"
+type of samples interleaving in input image, where
+.I config
+may be:
+.ta \w'\fBpixel \fR'u
+.br
+.B pixel\t
+pixel interleaved data (default),
+.br
+.B band\t
+band interleaved data.
+.TP
+.BI \-p " photo"
+photometric interpretation (color space) of the input image, where
+.I photo
+may be:
+.ta \w'\fBminiswhite \fR'u
+.br
+.B miniswhite\t
+white color represented with 0 value,
+.br
+.B minisblack\t
+black color represented with 0 value (default),
+.br
+.B rgb\t
+image has RGB color model,
+.br
+.B cmyk\t
+image has CMYK (separated) color model,
+.br
+.B ycbcr\t
+image has YCbCr color model,
+.br
+.B cielab\t
+image has CIE L*a*b color model,
+.br
+.B icclab\t
+image has ICC L*a*b color model,
+.br
+.B itulab\t
+image has ITU L*a*b color model.
+.TP
+.B \-s
+swap bytes fetched from the input file.
+.TP
+.B \-L
+input data has LSB2MSB bit order (default).
+.TP
+.B \-M
+input data has MSB2LSB bit order.
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression,
+.B "\-c packbits"
+for the PackBits compression algorithm (the default),
+.B "\-c jpeg"
+for the baseline JPEG compression algorithm,
+.B "\-c zip"
+for the Deflate compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch.
+.TP
+.BI \-r " number"
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.SH GUESSING THE IMAGE GEOMETRY
+.I raw2tiff
+can guess image width and height in case one or both of these parameters are
+not specified. If you omit one of those parameters, the complementary one will
+be calculated based on the file size (taking into account header size, number
+of bands and data type). If you omit both parameters, the statistical approach
+will be used. Utility will compute correlation coefficient between two lines
+at the image center using several appropriate line sizes and the highest
+absolute value of the coefficient will indicate the right line size. That is
+why you should be cautious with the very large images, because guessing
+process may take a while (depending on your system performance). Of course, the
+utility can't guess the header size, number of bands and data type, so it
+should be specified manually. If you don't know anything about your image,
+just try with the several combinations of those options.
+.P
+There is no magic, it is just a mathematical statistics, so it can be wrong
+in some cases. But for most ordinary images guessing method will work fine.
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.bR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/rgb2ycbcr.1 b/tiff/man/rgb2ycbcr.1
new file mode 100644
index 0000000..53f5050
--- /dev/null
+++ b/tiff/man/rgb2ycbcr.1
@@ -0,0 +1,99 @@
+.\" $Header: /cvs/maptools/cvsroot/libtiff/man/rgb2ycbcr.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH RGB2YCBCR 1 "November 2, 2005" "libtiff"
+.SH NAME
+rgb2ycbcr \- convert non-YCbCr
+.SM TIFF
+images to a YCbCr
+.SM TIFF
+image
+.SH SYNOPSIS
+.B rgb2ycbcr
+[
+.I options
+]
+.I "src1.tif src2.tif ... dst.tif"
+.SH DESCRIPTION
+.I rgb2ycbcr
+converts
+.SM RGB
+color, greyscale, or bi-level
+.SM TIFF
+images to YCbCr images by transforming and sampling pixel data. If multiple
+files are specified on the command line each source file is converted to a
+separate directory in the destination file.
+.PP
+By default, chrominance samples are created by sampling
+2 by 2 blocks of luminance values; this can be changed with the
+.B \-h
+and
+.B \-v
+options.
+Output data are compressed with the
+.SM PackBits
+compression scheme, by default; an alternate scheme can be selected with the
+.B \-c
+option.
+By default, output data are compressed in strips with
+the number of rows in each strip selected so that the
+size of a strip is never more than 8 kilobytes;
+the
+.B \-r
+option can be used to explicitly set the number of
+rows per strip.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression,
+.B "\-c packbits"
+for the PackBits compression algorithm (the default),
+.B "\-c jpeg"
+for the JPEG compression algorithm,
+.B "\-c zip"
+for the deflate compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch.
+.TP
+.B \-h
+Set the horizontal sampling dimension to one of: 1, 2 (default), or 4.
+.TP
+.B \-r
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.TP
+.B \-v
+Set the vertical sampling dimension to one of: 1, 2 (default), or 4.
+.SH "SEE ALSO"
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff
diff --git a/tiff/man/sgi2tiff.1 b/tiff/man/sgi2tiff.1
new file mode 100644
index 0000000..b6e86b1
--- /dev/null
+++ b/tiff/man/sgi2tiff.1
@@ -0,0 +1,93 @@
+.\" $Id: sgi2tiff.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1991-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH SGI2TIFF 1 "November 2, 2005" "libtiff"
+.SH NAME
+sgi2tiff \- create a
+.SM TIFF
+file from an
+.SM SGI
+image file
+.SH SYNOPSIS
+.B sgi2tiff
+[
+.I options
+]
+.I input.rgb
+.I output.tif
+.SH DESCRIPTION
+.I sgi2tiff
+converts a file in the
+.SM SGI
+image format to
+.SM TIFF.
+By default, the
+.SM TIFF
+image is created with data samples packed (\c
+.IR PlanarConfiguration =1),
+compressed with the Lempel-Ziv & Welch algorithm (\c
+.IR Compression =5),
+and with each strip no more than 8 kilobytes.
+These characteristics can overridden, or explicitly specified
+with the options described below.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression,
+.B "\-c packbits"
+for the PackBits compression algorithm),
+.B "\-c jpeg"
+for the baseline JPEG compression algorithm,
+.B "\-c zip
+for the Deflate compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch (the default).
+.TP
+.B \-p
+Explicitly select the planar configuration used in organizing
+data samples in the output image:
+.B "\-p contig"
+for samples packed contiguously, and
+.B "\-p separate"
+for samples stored separately.
+By default samples are packed.
+.TP
+.B \-r
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.SH BUGS
+Does not record colormap information.
+.SH "SEE ALSO"
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/thumbnail.1 b/tiff/man/thumbnail.1
new file mode 100644
index 0000000..e9d6213
--- /dev/null
+++ b/tiff/man/thumbnail.1
@@ -0,0 +1,90 @@
+.\" $Id: thumbnail.1,v 1.2 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1994-1997 Sam Leffler
+.\" Copyright (c) 1994-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH THUMBNAIL 1 "November 2, 2005" "libtiff"
+.SH NAME
+thumbnail \- create a
+.SM TIFF
+file with thumbnail images
+.SH SYNOPSIS
+.B thumbnail
+[
+.I options
+]
+.I input.tif
+.I output.tif
+.SH DESCRIPTION
+.I thumbnail
+is a program written to show how one might use the
+SubIFD tag (#330) to store thumbnail images.
+.I thumbnail
+copies a
+.SM TIFF
+Class F facsimile file to the output file
+and for each image an 8-bit greyscale
+.IR "thumbnail sketch" .
+The output file contains the thumbnail image with the associated
+full-resolution page linked below with the SubIFD tag.
+.PP
+By default, thumbnail images are 216 pixels wide by 274 pixels high.
+Pixels are calculated by sampling and filtering the input image
+with each pixel value passed through a contrast curve.
+.SH OPTIONS
+.TP
+.B \-w
+Specify the width of thumbnail images in pixels.
+.TP
+.B \-h
+Specify the height of thumbnail images in pixels.
+.TP
+.B \-c
+Specify a contrast curve to apply in generating the thumbnail images.
+By default pixels values are passed through a linear contrast curve
+that simply maps the pixel value ranges.
+Alternative curves are:
+.B exp50
+for a 50% exponential curve,
+.B exp60
+for a 60% exponential curve,
+.B exp70
+for a 70% exponential curve,
+.B exp80
+for a 80% exponential curve,
+.B exp90
+for a 90% exponential curve,
+.B exp
+for a pure exponential curve,
+.B linear
+for a linear curve.
+.SH BUGS
+There are no options to control the format of the saved thumbnail images.
+.SH "SEE ALSO"
+.BR tiffdump (1),
+.BR tiffgt (1),
+.BR tiffinfo (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiff2bw.1 b/tiff/man/tiff2bw.1
new file mode 100644
index 0000000..4949b9a
--- /dev/null
+++ b/tiff/man/tiff2bw.1
@@ -0,0 +1,94 @@
+.\" $Id: tiff2bw.1,v 1.3 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFF2BW 1 "November 2, 2005" "libtiff"
+.SH NAME
+tiff2bw \- convert a color
+.SM TIFF
+image to greyscale
+.SH SYNOPSIS
+.B tiff2bw
+[
+.I options
+]
+.I input.tif
+.I output.tif
+.SH DESCRIPTION
+.I Tiff2bw
+converts an
+.SM RGB
+or Palette color
+.SM TIFF
+image to a greyscale image by
+combining percentages of the red, green, and blue channels.
+By default, output samples are created by taking
+28% of the red channel, 59% of the green channel, and 11% of
+the blue channel.
+To alter these percentages, the
+.BR \-R ,
+.BR \-G ,
+and
+.BR \-B
+options may be used.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression,
+.B "\-c packbits"
+for the PackBits compression algorithm,
+.B "\-c zip
+for the Deflate compression algorithm,
+.B "\-c g3
+for the CCITT Group 3 compression algorithm,
+.B "\-c g4
+for the CCITT Group 4 compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch (the default).
+.TP
+.B \-r
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.TP
+.B \-R
+Specify the percentage of the red channel to use (default 28).
+.TP
+.B \-G
+Specify the percentage of the green channel to use (default 59).
+.TP
+.B \-B
+Specify the percentage of the blue channel to use (default 11).
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiff2pdf.1 b/tiff/man/tiff2pdf.1
new file mode 100644
index 0000000..9c54e9e
--- /dev/null
+++ b/tiff/man/tiff2pdf.1
@@ -0,0 +1,251 @@
+.\" $Id: tiff2pdf.1,v 1.6 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 2003 Ross Finlayson
+.\"
+.\" 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 name of
+.\" Ross Finlayson may not be used in any advertising or
+.\" publicity relating to the software without the specific, prior written
+.\" permission of Ross Finlayson.
+.\"
+.\" 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 ROSS FINLAYSON 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.
+.\"
+.\" Process this file with
+.\" groff -man -Tascii tiff2pdf.1
+.\"
+.TH TIFF2PDF 1 "April 20, 2006" "libtiff"
+.SH NAME
+tiff2pdf \- convert a TIFF image to a PDF document
+.SH SYNOPSIS
+.B tiff2pdf
+[
+.I options
+]
+.I input.tiff
+.SH DESCRIPTION
+.I tiff2pdf
+opens a TIFF image and writes a PDF document to standard output.
+.PP
+The program converts one TIFF file to one PDF file, including multiple page
+TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF
+files that contain data of TIFF photometric interpretations of bilevel,
+grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by
+.I libtiff
+and PDF.
+.PP
+If you have multiple TIFF files to convert into one PDF file then use
+.I tiffcp
+or other program to concatenate the files into a multiple page TIFF file.
+If the input TIFF file is of huge dimensions (greater than 10000 pixels height
+or width) convert the input image to a tiled TIFF if it is not already.
+.PP
+The standard output is standard output. Set the output file name with the
+.BI \-o " output.pdf"
+option.
+.PP
+All black and white files are compressed into a single strip CCITT G4 Fax
+compressed PDF, unless tiled, where tiled black and white images are
+compressed into tiled CCITT G4 Fax compressed PDF,
+.I libtiff
+CCITT support is assumed.
+.PP
+Color and grayscale data can be compressed using either JPEG compression,
+ITU-T T.81, or Zip/Deflate LZ77 compression. Set the compression type using
+the
+.B \-j
+or
+.B \-z
+options. JPEG compression support
+requires that
+.I libtiff
+be configured with JPEG support, and Zip/Deflate compression support requires
+that
+.I libtiff
+be configured with Zip support, in tiffconf.h. Use only one or the other of
+.B \-j
+and
+.B \-z.
+.PP
+If the input TIFF contains single strip CCITT G4 Fax compressed information,
+then that is written to the PDF file without transcoding, unless the options
+of no compression and no passthrough are set,
+.B \-d
+and
+.B \-n.
+.PP
+If the input TIFF contains JPEG or single strip Zip/Deflate compressed
+information, and they are configured, then that is written to the PDF file
+without transcoding, unless the options of no compression and no passthrough
+are set.
+.PP
+The default page size upon which the TIFF image is placed is determined by
+the resolution and extent of the image data. Default values for the TIFF
+image resolution can be set using the
+.B \-x
+and
+.B \-y
+options. The page size can be set using the
+.B \-p
+option for paper size, or
+.B \-w
+and
+.B \-l
+for paper width and length, then each page of the TIFF image is centered on
+its page. The distance unit for default resolution and page width and
+length can be set by the
+.B \-u
+option, the default unit is inch.
+.PP
+Various items of the output document information can be set with the
+.BR \-e ,
+.BR \-c ,
+.BR \-a ,
+.BR \-t ,
+.BR \-s ,
+and
+.B \-k
+options. Setting the argument of the option to "" for these
+tags causes the relevant document information field to be not written. Some
+of the document information values otherwise get their information from the
+input TIFF image, the software, author, document name, and image description.
+.PP
+The Portable Document Format (PDF) specification is copyrighted by Adobe
+Systems, Incorporated.
+.SH OPTIONS
+.TP
+.BI \-o " output-file"
+Set the output to go to file.
+.I output-file
+.TP
+.B \-j
+Compress with JPEG (requires
+.I libjpeg
+configured with
+.IR libtiff ).
+.TP
+.B \-z
+Compress with Zip/Deflate (requires
+.I zlib
+configured with
+.IR libtiff ).
+.TP
+.BI \-q " quality"
+Set the compression quality, 1-100 for JPEG.
+.TP
+.B \-n
+Do not allow data to be converted without uncompressing, no compressed
+data passthrough.
+.TP
+.BI \-b
+Set PDF ``Interpolate'' user preference.
+.TP
+.B \-d
+Do not compress (decompress).
+.TP
+.B \-i
+Invert colors.
+.TP
+.BI \-p " paper-size"
+Set paper size, e.g.,
+.BR letter ,
+.BR legal ,
+.BR A4 .
+.TP
+.BR \-u " [" i | m ]
+Set distance unit,
+.B i
+for inch,
+.B m
+for centimeter.
+.TP
+.BI \-w " width"
+Set width in units.
+.TP
+.BI \-l " length"
+Set length in units.
+.TP
+.BI \-x " xres"
+Set x/width resolution default.
+.TP
+.BI \-y " yres"
+Set y/length resolution default.
+.TP
+.BR \-r " [" d | o ]
+Set
+.B d
+for resolution default for images without resolution,
+.B o
+for resolution override for all images.
+.TP
+.BI \-f
+Set PDF ``Fit Window'' user preference.
+.TP
+.BI \-e " YYYYMMDDHHMMSS"
+Set document information date, overrides image or current date/time default,
+.I YYYYMMDDHHMMSS.
+.TP
+.BI \-c " creator"
+Set document information creator, overrides image software default.
+.TP
+.BI \-a " author"
+Set document information author, overrides image artist default.
+.TP
+.BI \-t " title"
+Set document information title, overrides image document name default.
+.TP
+.BI \-s " subject"
+Set document information subject, overrides image image description default.
+.TP
+.BI \-k " keywords"
+Set document information keywords.
+.TP
+.B \-h
+List usage reminder to stderr and exit.
+.SH EXAMPLES
+.TP
+The following example would generate the file output.pdf from input.tiff.
+.RS
+.nf
+tiff2pdf \-o output.pdf input.tiff
+.fi
+.RE
+.PP
+The following example would generate PDF output from input.tiff and write it
+to standard output.
+.RS
+.nf
+tiff2pdf input.tiff
+.fi
+.RE
+.PP
+The following example would generate the file output.pdf from input.tiff,
+putting the image pages on a letter sized page, compressing the output
+with JPEG, with JPEG quality 75, setting the title to ``Document'', and setting
+the ``Fit Window'' option.
+.RS
+.nf
+tiff2pdf \-p letter \-j \-q 75 \-t "Document" \-f \-o output.pdf input.tiff
+.fi
+.RE
+.SH BUGS
+Please report bugs via the web interface at
+.IP
+\%http://bugzilla.remotesensing.org/enter_bug.cgi?product=libtiff
+.SH "SEE ALSO"
+.BR libtiff (3),
+.BR tiffcp (1),
+.BR tiff2ps (1)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiff2ps.1 b/tiff/man/tiff2ps.1
new file mode 100644
index 0000000..9b5508d
--- /dev/null
+++ b/tiff/man/tiff2ps.1
@@ -0,0 +1,268 @@
+.\" $Id: tiff2ps.1,v 1.9.2.2 2009-08-20 18:40:33 bfriesen Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.ds Ps PostScript
+.if n .po 0
+.TH TIFF2PS 1 "November 2, 2005" "libtiff"
+.SH NAME
+tiff2ps \- convert a
+.SM TIFF
+image to \*(Ps\*(Tm
+.SH SYNOPSIS
+.B tiff2ps
+[
+.I options
+]
+.I "input.tif ..."
+.SH DESCRIPTION
+.I tiff2ps
+reads
+.SM TIFF
+images and writes \*(Ps or Encapsulated \*(Ps (EPS)
+on the standard output.
+By default,
+.I tiff2ps
+writes Encapsulated \*(Ps for the first image in the specified
+.SM TIFF
+image file.
+.PP
+By default,
+.I tiff2ps
+will generate \*(Ps that fills a printed area specified
+by the
+.SM TIFF
+tags in the input file.
+If the file does not contain
+.I XResolution
+or
+.I YResolution
+tags, then the printed area is set according to the image dimensions.
+The
+.B \-w
+and
+.B \-h
+options (see below)
+can be used to set the dimensions of the printed area in inches;
+overriding any relevant
+.SM TIFF
+tags.
+.PP
+The \*(Ps generated for
+.SM RGB,
+palette, and
+.SM CMYK
+images uses the
+.I colorimage
+operator.
+The \*(Ps generated for
+greyscale and bilevel images
+uses the
+.I image
+operator.
+When the
+.I colorimage
+operator is used, \*(Ps code to emulate this operator
+on older \*(Ps printers is also generated.
+Note that this emulation code can be very slow.
+.PP
+Color images with associated alpha data are composited over
+a white background.
+.SH OPTIONS
+.TP
+.B \-1
+Generate \*(Ps Level 1 (the default).
+.TP
+.B \-2
+Generate \*(Ps Level 2.
+.TP
+.B \-3
+Generate \*(Ps Level 3. It basically allows one to use the /flateDecode
+filter for ZIP compressed TIFF images.
+.TP
+.B \-a
+Generate output for all IFDs (pages) in the input file.
+.TP
+.B \-b
+Specify the bottom margin for the output (in inches). This does not affect
+the height of the printed image.
+.TP
+.B \-c
+Center the image in the output. This option only shows an effect if both
+the
+.B \-w
+and the
+.B \-h
+option are given.
+.TP
+.B \-d
+Set the initial
+.SM TIFF
+directory to the specified directory number.
+(NB: Directories are numbered starting at zero.)
+This option is useful for selecting individual pages in a
+multi-page (e.g. facsimile) file.
+.TP
+.B \-e
+Force the generation of Encapsulated \*(Ps (implies
+.BR \-z ).
+.TP
+.B \-h
+Specify the vertical size of the printed area (in inches).
+.TP
+.B \-H
+Specify the maximum height of image (in inches). Images with larger sizes will
+be split in several pages. Option
+.B \-L
+may be used for specifying size of split images overlapping.
+.TP
+.B \-W
+Specify the maximum width of image (in inches). Images with larger sizes will
+be split in several pages. Options
+.B \-L
+and
+.B \-W
+are mutually exclusive.
+.B \-i
+Enable/disable pixel interpolation. This option requires a
+single numeric value: zero to disable pixel interpolation and
+non-zero to enable. The default is enabled.
+.TP
+.B \-L
+Specify the size of overlapping for split images (in inches). Used in
+conjunction with
+.B \-H
+option.
+.TP
+.B \-l
+Specify the left margin for the output (in inches). This does not affect
+the width of the printed image.
+.TP
+.B \-m
+Where possible render using the
+.I imagemask
+\*(Ps operator instead of the
+.I image
+operator. When this option is specified
+.I tiff2ps
+will use
+.I imagemask
+for rendering 1 bit deep images. If this option is not specified
+or if the image depth is greater than 1 then the
+.I image
+operator is used.
+.TP
+.B \-o
+Set the initial
+.SM TIFF
+directory to the
+.SM IFD
+at the specified file offset.
+This option is useful for selecting thumbnail images and the
+like which are hidden using the
+.I SubIFD
+tag.
+.TP
+.B \-p
+Force the generation of (non-Encapsulated) \*(Ps.
+.TP
+.B \-r
+Rotate image by 180 degrees.
+.TP
+.B \-s
+Generate output for a single IFD (page) in the input file.
+.TP
+.B \-w
+Specify the horizontal size of the printed area (in inches).
+.TP
+.B \-x
+Override resolution units specified in the TIFF as centimeters.
+.TP
+.B \-y
+Override resolution units specified in the TIFF as inches.
+.TP
+.B \-z
+When generating \*(Ps Level 2, data is scaled so that it does not
+image into the
+.I deadzone
+on a page (the outer margin that the printing device is unable to mark).
+This option suppresses this behavior.
+When \*(Ps Level 1 is generated, data is imaged to the entire printed
+page and this option has no affect.
+.SH EXAMPLES
+The following generates \*(Ps Level 2 for all pages of a facsimile:
+.RS
+.nf
+tiff2ps \-a2 fax.tif | lpr
+.fi
+.RE
+Note also that if you have version 2.6.1 or newer of Ghostscript then you
+can efficiently preview facsimile generated with the above command.
+.PP
+To generate Encapsulated \*(Ps for a the image at directory 2
+of an image use:
+.RS
+.nf
+tiff2ps \-d 1 foo.tif
+.fi
+.RE
+(Notice that directories are numbered starting at zero.)
+.PP
+If you have a long image, it may be split in several pages:
+.RS
+.nf
+tiff2ps \-h11 \-w8.5 \-H14 \-L.5 foo.tif > foo.ps
+.fi
+.RE
+The page size is set to 8.5x11 by
+.B \-w
+and
+.B \-h
+options. We will accept a small amount of vertical compression, so
+.B \-H
+set to 14. Any pages between 11 and 14 inches will be fit onto one page.
+Pages longer than 14 inches are cut off at 11 and continued on the next
+page. The
+.B \-L.5
+option says to repeat a half inch on the next page (to improve readability).
+.SH BUGS
+Because \*(Ps does not support the notion of a colormap,
+8-bit palette images produce 24-bit \*(Ps images.
+This conversion results in output that is six times
+bigger than the original image and which takes a long time
+to send to a printer over a serial line.
+Matters are even worse for 4-, 2-, and 1-bit palette images.
+.PP
+Does not handle tiled images when generating \*(Ps Level I output.
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffgt (1),
+.BR tiffmedian (1),
+.BR tiff2bw (1),
+.BR tiffsv (1),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiff2rgba.1 b/tiff/man/tiff2rgba.1
new file mode 100644
index 0000000..ec2b31e
--- /dev/null
+++ b/tiff/man/tiff2rgba.1
@@ -0,0 +1,97 @@
+.\" $Id: tiff2rgba.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFF2RGBA 1 "November 2, 2005" "libtiff"
+.SH NAME
+tiff2rgba \- convert a
+.SM TIFF
+image to RGBA color space
+.SH SYNOPSIS
+.B tiff2rgba
+[
+.I options
+]
+.I input.tif
+.I output.tif
+.SH DESCRIPTION
+.I Tiff2rgba
+converts a wide variety of TIFF images into an RGBA TIFF image. This
+includes the ability to translate different color spaces and photometric
+interpretation into RGBA, support for alpha blending, and translation
+of many different bit depths into a 32bit RGBA image.
+.P
+Internally this program is implemented using the
+.I TIFFReadRGBAImage()
+function, and it suffers any limitations of that image. This includes
+limited support for > 8 BitsPerSample images, and flaws with some
+esoteric combinations of BitsPerSample, photometric interpretation,
+block organization and planar configuration.
+.P
+The generated images are stripped images with four samples per pixel
+(red, green, blue and alpha) or if the
+.B \-n
+flag is used, three samples
+per pixel (red, green, and blue). The resulting images are always planar
+configuration contiguous. For this reason, this program is a useful utility
+for transform exotic TIFF files into a form ingestible by almost any TIFF
+supporting software.
+.SH OPTIONS
+.TP
+.B \-c
+Specify a compression scheme to use when writing image data:
+.B "\-c none"
+for no compression (the default),
+.B "\-c packbits"
+for the PackBits compression algorithm,
+.B "\-c zip"
+for the Deflate compression algorithm,
+.B "\-c jpeg"
+for the JPEG compression algorithm,
+and
+.B "\-c lzw"
+for Lempel-Ziv & Welch.
+.TP
+.B \-r
+Write data with a specified number of rows per strip;
+by default the number of rows/strip is selected so that each strip
+is approximately 8 kilobytes.
+.TP
+.B \-b
+Process the image one block (strip/tile) at a time instead of by reading
+the whole image into memory at once. This may be necessary for very large
+images on systems with limited RAM.
+.TP
+.B \-n
+Drop the alpha component from the output file, producing a pure RGB file.
+Currently this does not work if the
+.B \-b
+flag is also in effect.
+.SH "SEE ALSO"
+.BR tiff2bw (1),
+.BR TIFFReadRGBAImage (3t),
+.BR libtiff (3)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffcmp.1 b/tiff/man/tiffcmp.1
new file mode 100644
index 0000000..efd519f
--- /dev/null
+++ b/tiff/man/tiffcmp.1
@@ -0,0 +1,87 @@
+.\" $Id: tiffcmp.1,v 1.5 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFCMP 1 "November 2, 2005" "libtiff"
+.SH NAME
+tiffcmp \- compare two
+.SM TIFF
+files
+.SH SYNOPSIS
+.B tiffcmp
+[
+.I options
+]
+.I "file1.tif file2.tif"
+.SH DESCRIPTION
+.I Tiffcmp
+compares the tags and data in two files created according
+to the Tagged Image File Format, Revision 6.0.
+The schemes used for compressing data in each file
+are immaterial when data are compared\-data are compared on
+a scanline-by-scanline basis after decompression.
+Most directory tags are checked; notable exceptions are:
+.IR GrayResponseCurve ,
+.IR ColorResponseCurve ,
+and
+.IR ColorMap
+tags.
+Data will not be compared if any of the
+.IR BitsPerSample ,
+.IR SamplesPerPixel ,
+or
+.I ImageWidth
+values are not equal.
+By default,
+.I tiffcmp
+will terminate if it encounters any difference.
+.SH OPTIONS
+.TP
+.B \-l
+List each byte of image data that differs between the files.
+.TP
+.BI \-z " number"
+List specified number of image data bytes that differs between the files.
+.TP
+.B \-t
+Ignore any differences in directory tags.
+.SH BUGS
+Tags that are not recognized by the library are not
+compared; they may also generate spurious diagnostics.
+.PP
+The image data of tiled files is not compared, since the
+.I TIFFReadScanline()
+function is used. An error will be reported for tiled files.
+.PP
+The pixel and/or sample number reported in differences may be off
+in some exotic cases.
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.bR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffcp.1 b/tiff/man/tiffcp.1
new file mode 100644
index 0000000..56f4ebe
--- /dev/null
+++ b/tiff/man/tiffcp.1
@@ -0,0 +1,291 @@
+.\" $Id: tiffcp.1,v 1.9.2.1 2010-06-04 16:51:14 fwarmerdam Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFCP 1 "February 24, 2007" "libtiff"
+.SH NAME
+tiffcp \- copy (and possibly convert) a
+.SM TIFF
+file
+.SH SYNOPSIS
+.B tiffcp
+[
+.I options
+]
+.I "src1.tif ... srcN.tif dst.tif"
+.SH DESCRIPTION
+.I tiffcp
+combines one or more files created according
+to the Tag Image File Format, Revision 6.0
+into a single
+.SM TIFF
+file.
+Because the output file may be compressed using a different
+algorithm than the input files,
+.I tiffcp
+is most often used to convert between different compression
+schemes.
+.PP
+By default,
+.I tiffcp
+will copy all the understood tags in a
+.SM TIFF
+directory of an input
+file to the associated directory in the output file.
+.PP
+.I tiffcp
+can be used to reorganize the storage characteristics of data
+in a file, but it is explicitly intended to not alter or convert
+the image data content in any way.
+.SH OPTIONS
+.TP
+.BI \-b " image"
+subtract the following monochrome image from all others
+processed. This can be used to remove a noise bias
+from a set of images. This bias image is typically an
+image of noise the camera saw with its shutter closed.
+.TP
+.B \-B
+Force output to be written with Big-Endian byte order.
+This option only has an effect when the output file is created or
+overwritten and not when it is appended to.
+.TP
+.B \-C
+Suppress the use of ``strip chopping'' when reading images
+that have a single strip/tile of uncompressed data.
+.TP
+.B \-c
+Specify the compression to use for data written to the output file:
+.B none
+for no compression,
+.B packbits
+for PackBits compression,
+.B lzw
+for Lempel-Ziv & Welch compression,
+.B jpeg
+for baseline JPEG compression,
+.B zip
+for Deflate compression,
+.B g3
+for CCITT Group 3 (T.4) compression,
+and
+.B g4
+for CCITT Group 4 (T.6) compression.
+By default
+.I tiffcp
+will compress data according to the value of the
+.I Compression
+tag found in the source file.
+.IP
+The
+.SM CCITT
+Group 3 and Group 4 compression algorithms can only
+be used with bilevel data.
+.IP
+Group 3 compression can be specified together with several
+T.4-specific options:
+.B 1d
+for 1-dimensional encoding,
+.B 2d
+for 2-dimensional encoding,
+and
+.B fill
+to force each encoded scanline to be zero-filled so that the
+terminating EOL code lies on a byte boundary.
+Group 3-specific options are specified by appending a ``:''-separated
+list to the ``g3'' option; e.g.
+.B "\-c g3:2d:fill"
+to get 2D-encoded data with byte-aligned EOL codes.
+.IP
+.SM LZW
+compression can be specified together with a
+.I predictor
+value.
+A predictor value of 2 causes
+each scanline of the output image to undergo horizontal
+differencing before it is encoded; a value
+of 1 forces each scanline to be encoded without differencing.
+LZW-specific options are specified by appending a ``:''-separated
+list to the ``lzw'' option; e.g.
+.B "\-c lzw:2"
+for
+.SM LZW
+compression with horizontal differencing.
+.TP
+.B \-f
+Specify the bit fill order to use in writing output data.
+By default,
+.I tiffcp
+will create a new file with the same fill order as the original.
+Specifying
+.B "\-f lsb2msb"
+will force data to be written with the FillOrder tag set to
+.SM LSB2MSB,
+while
+.B "\-f msb2lsb"
+will force data to be written with the FillOrder tag set to
+.SM MSB2LSB.
+.TP
+.B \-i
+Ignore non-fatal read errors and continue processing of the input file.
+.TP
+.B \-l
+Specify the length of a tile (in pixels).
+.I tiffcp
+attempts to set the tile dimensions so
+that no more than 8 kilobytes of data appear in a tile.
+.TP
+.B \-L
+Force output to be written with Little-Endian byte order.
+This option only has an effect when the output file is created or
+overwritten and not when it is appended to.
+.TP
+.B \-M
+Suppress the use of memory-mapped files when reading images.
+.TP
+.B \-p
+Specify the planar configuration to use in writing image data
+that has one 8-bit sample per pixel.
+By default,
+.I tiffcp
+will create a new file with the same planar configuration as
+the original.
+Specifying
+.B "\-p contig"
+will force data to be written with multi-sample data packed
+together, while
+.B "\-p separate"
+will force samples to be written in separate planes.
+.TP
+.B \-r
+Specify the number of rows (scanlines) in each strip of data
+written to the output file.
+By default (or when value
+.B 0
+is specified),
+.I tiffcp
+attempts to set the rows/strip
+that no more than 8 kilobytes of data appear in a strip. If you specify
+special value
+.B \-1
+it will results in infinite number of the rows per strip. The entire image
+will be the one strip in that case.
+.TP
+.B \-s
+Force the output file to be written with data organized in strips
+(rather than tiles).
+.TP
+.B \-t
+Force the output file to be written with data organized in tiles (rather than
+strips). options can be used to force the resultant image to be written as
+strips or tiles of data, respectively.
+.TP
+.B \-w
+Specify the width of a tile (in pixels).
+.I tiffcp
+attempts to set the tile dimensions so that no more than 8 kilobytes of data
+appear in a tile.
+.I tiffcp
+attempts to set the tile dimensions so that no more than 8 kilobytes of data
+appear in a tile.
+.TP
+.B \-x
+Force the output file to be written with PAGENUMBER value in sequence.
+.TP
+.BI \-,= character
+substitute
+.I character
+for `,' in parsing image directory indices
+in files. This is necessary if filenames contain commas.
+Note that
+.B \-,=
+with whitespace immediately following will disable
+the special meaning of the `,' entirely. See examples.
+.SH EXAMPLES
+The following concatenates two files and writes the result using
+.SM LZW
+encoding:
+.RS
+.nf
+tiffcp \-c lzw a.tif b.tif result.tif
+.fi
+.RE
+.PP
+To convert a G3 1d-encoded
+.SM TIFF
+to a single strip of G4-encoded data the following might be used:
+.RS
+.nf
+tiffcp \-c g4 \-r 10000 g3.tif g4.tif
+.fi
+.RE
+(1000 is just a number that is larger than the number of rows in
+the source file.)
+
+To extract a selected set of images from a multi-image TIFF file, the file
+name may be immediately followed by a `,' separated list of image directory
+indices. The first image is always in directory 0. Thus, to copy the 1st and
+3rd images of image file ``album.tif'' to ``result.tif'':
+.RS
+.nf
+tiffcp album.tif,0,2 result.tif
+.fi
+.RE
+
+A trailing comma denotes remaining images in sequence. The following command
+will copy all image with except the first one:
+.RS
+.nf
+tiffcp album.tif,1, result.tif
+.fi
+.RE
+
+Given file ``CCD.tif'' whose first image is a noise bias
+followed by images which include that bias,
+subtract the noise from all those images following it
+(while decompressing) with the command:
+.RS
+.nf
+tiffcp \-c none \-b CCD.tif CCD.tif,1, result.tif
+.fi
+.RE
+
+If the file above were named ``CCD,X.tif'', the
+.B \-,=
+option would
+be required to correctly parse this filename with image numbers,
+as follows:
+.RS
+.nf
+tiffcp \-c none \-,=% \-b CCD,X.tif CCD,X%1%.tif result.tif
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffinfo (1),
+.BR tiffcmp (1),
+.BR tiffmedian (1),
+.BR tiffsplit (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffcrop.1 b/tiff/man/tiffcrop.1
new file mode 100644
index 0000000..f5cffd5
--- /dev/null
+++ b/tiff/man/tiffcrop.1
@@ -0,0 +1,571 @@
+.\" $Id: tiffcrop.1,v 1.1.2.4 2010-06-11 22:24:23 bfriesen Exp $
+.\" tiffcrop -- a port of tiffcp.c extended to include extended processing of images
+.\"
+.\" Original code:
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.\" Additional code Copyright (c) 2006-2009 Richard Nolde
+.\" Lasted Updated 9/2009
+.\" .if n .po 0
+.TH "TIFFCROP" "1" "December, 2008" "libtiff" ""
+.SH "NAME"
+tiffcrop \- select, copy, crop, convert, extract, and/or process one or more
+.SM TIFF
+files.
+.SH "SYNOPSIS"
+.B tiffcrop
+[
+.I options
+]
+.I "src1.tif ... srcN.tif dst.tif"
+.SH "DESCRIPTION"
+.I Tiffcrop
+processes one or more files created according
+to the Tag Image File Format, Revision 6.0, specification
+into one or more
+.SM TIFF
+file(s).
+.I Tiffcrop
+is most often used to extract portions of an image for processing
+with bar code recognizer or OCR software when that software cannot
+restrict the region of interest to a specific portion of the image
+or to improve efficiency when the regions of interest must be rotated.
+It can also be used to subdivide all or part of a processed image into
+smaller sections and export individual images or sections of images
+as separate files or separate images within one or more files derived
+from the original input image or images.
+.PP
+The available functions can be grouped broadly into three classes:
+.IP
+Those that select individual images or sections of images from the input files.
+The options \-N for sequences or lists of individual images in the input files,
+\-Z for zones, \-z for regions, \-X and \-Y for fixed sized selections,
+\-m for margins, \-U for units, and \-E for edge reference provide a variety of
+ways to specify portions of the input image.
+.IP
+Those that allow the individual images or selections to be exported to one or
+more output files in different groupings and control the organization of the
+data in the output images. The options \-P for page size grouping, \-S for
+subdivision into columns and rows and \-e for export mode options that produce
+one or more files from each input image. The options \-r, \-s, \-t, \-w control
+strip and tile format and sizes while \-B \-L \-c \-f modify the endian addressing
+scheme, the compression options, and the bit fill sequence of images as they
+are written.
+.IP
+Those that perform some action on each image that is selected from the input file.
+The options include \-R for rotate, \-I for inversion of the photometric
+interpretation and/or data values, and \-F to flip (mirror) the image horizontally
+or vertically.
+.PP
+
+Functions are applied to the input image(s) in the following order:
+cropping, fixed area extraction, zone and region extraction,
+inversion, mirroring, rotation.
+.PP
+Functions are applied to the output image(s) in the following order:
+export mode options for grouping zones, regions, or images into
+one or more files,
+.I or
+row and column divisions with output margins,
+.I or
+page size divisions with page orientation options.
+.PP
+Finally, strip, tile, byte order, output resolution, and compression options are
+applied to all output images.
+.PP
+The output file(s) may be organized and compressed using a different
+algorithm from the input files.
+By default,
+.I tiffcrop
+will copy all the understood tags in a
+.SM TIFF
+directory of an input file to the associated directory in the output file.
+Options can be used to force the resultant image to be written as strips
+or tiles of data, respectively.
+.PP
+.I Tiffcrop
+can be used to reorganize the storage characteristics of data
+in a file, and to reorganize, extract, rotate, and otherwise
+process the image data as specified at the same time whereas
+tiffcp does not alter the image data within the file.
+.PP
+Using the options for selecting individual input images and the
+options for exporting images and/or segments defined as zones or
+regions of each input image,
+.I tiffcrop
+can perform the functions of tiffcp and tiffsplit in a single pass
+while applying multiple operations to individual selections or images.
+.PP
+.SH "OPTIONS"
+.TP
+.B \-h
+Display the syntax summary for tiffcrop.
+.TP
+.B \-v
+Report the current version and last modification date for tiffcrop.
+.TP
+.B \-N odd|even|#,#\-#,#|last
+Specify one or more series or range(s) of images within each file to process.
+The words
+.B odd
+or
+.B even
+may be used to specify all odd or even numbered images counting from one.
+Note that internally, TIFF images are numbered from zero rather than one
+but since this convention is not obvious to most users, tiffcrop used 1
+to specifiy the first image in a multipage file. The word
+.B last
+may be used in place of a number in the sequence to indicate the
+final image in the file without knowing how many images there are.
+Ranges of images may be specified with a dash and multiple sets
+can be indicated by joining them in a comma\-separated list. eg. use
+.B \-N 1,5\-7,last
+to process the 1st, 5th through 7th, and final image in the file.
+.TP
+.B \-E top|bottom|left|right
+Specify the top, bottom, left, or right edge as the reference from
+which to calcuate the width and length of crop regions or sequence
+of postions for zones. When used with the \-e option for exporting
+zones or regions, the reference edge determines how composite images
+are arranged. Using \-E left or right causes successive zones or
+regions to be merged horizontally whereas using \-E top or bottom
+causes successive zones or regions to be arranged vertically. This
+option has no effect on export layout when multiple zones or regions
+are not being exported to composite images. Edges may be abbreviated
+to the first letter.
+.TP
+.B \-e combined|divided|image|multiple|separate
+Specify the export mode for images and selections from input images.
+The final filename on the command line is considered to be the
+destination file or filename stem for automatically generated
+sequences of files. Modes may be abbreviated to the first letter.
+.IP
+combined All images and selections are written to a single file with
+multiple selections from one image combined into a single image (default)
+.IP
+divided All images and selections are written to a single file
+with each selection from one image written to a new image
+.IP
+image Each input image is written to a new file (numeric filename sequence)
+with multiple selections from the image combined into one image
+.IP
+multiple Each input image is written to a new file (numeric filename sequence)
+with each selection from the image written to a new image
+.IP
+separate Individual selections from each image are written to separate files
+.TP
+.B \-U in|cm|px
+Specify the type of units to apply to dimensions for margins and
+crop regions for input and output images. Inches or centimeters
+are converted to pixels using the resolution unit specified in the
+TIFF file (which defaults to inches if not specified in the IFD).
+.TP
+.B \-m #,#,#,#
+Specify margins to be removed from the input image. The order must
+be top, left, bottom, right with only commas separating the elements
+of the list. Margins are scaled according to the current units and
+removed before any other extractions are computed..
+.TP
+.B \-X #
+Set the horizontal (X\-axis) dimension of a region to extract relative to
+the specified origin reference. If the origin is the top or bottom
+edge, the X axis value will be assumed to start at the left edge.
+.TP
+.B \-Y #
+Set the vertical (Y\-axis) dimension of a region to extract relative to
+the specified origin reference. If the origin is the left or right
+edge, the Y axis value will be assumed to start at the top.
+.TP
+.B \-Z #:#,#:#
+Specify zones of the image designated as position X of Y equal sized portions
+measured from the reference edge, eg 1:3 would be first third of the
+image starting from the reference edge minus any margins specified
+for the confining edges. Multiple zones can be specified as a comma
+separated list but they must reference the same edge. To extract the
+top quarter and the bottom third of an image you would use
+.B \-Z 1:4,3:3.
+.TP
+.B \-z x1,y1,x2,y2: ... :xN,yN,xN+1,yN+1
+Specify a series of coordinates to define regions for processing and exporting.
+The coordinates represent the top left and lower right corners of each region
+in the current units, eg inch, cm, or pixels. Pixels are counted from one to
+width or height and inches or cm are calculated from image resolution data.
+
+Each colon delimited series of four values represents the horizontal and vertical
+offsets from the top and left edges of the image, regardless of the edge specified
+with the \-E option. The first and third values represent the horizontal offsets of
+the corner points from the left edge while the second and fourth values represent
+the vertical offsets from the top edge.
+.TP
+.B \-F horiz|vert
+Flip, ie mirror, the image or extracted region horizontally or vertically.
+.TP
+.B \-R 90|180|270
+Rotate the image or extracted region 90, 180, or 270 degrees clockwise.
+.TP
+.B \\-I [black|white|data|both]
+Invert color space, eg dark to light for bilevel and grayscale images.
+This can be used to modify negative images to positive or to correct
+images that have the PHOTOMETRIC_INTERPRETATIN tag set incorrectly.
+If the value is black or white, the PHOTOMETRIC_INTERPRETATION tag is set to
+MinIsBlack or MinIsWhite, without altering the image data. If the argument
+is data or both, the data values of the image are modified. Specifying both
+inverts the data and the PHOTOMETRIC_INTERPRETATION tag, whereas using data
+inverts the data but not the PHOTOMETRIC_INTERPRETATION tag.
+No support for modifying the color space of color images in this release.
+.TP
+.B \-H #
+Set the horizontal resolution of output images to #
+expressed in the current units.
+.TP
+.B \-V #
+Set the vertical resolution of the output images to #
+expressed in the current units.
+.TP
+.B \-J #
+Set the horizontal margin of an output page size to #
+expressed in the current units when sectioning image into columns x rows
+subimages using the \-S cols:rows option.
+.TP
+.B \-K #
+Set the vertical margin of an output page size to #
+expressed in the current units when sectioning image into columns x rows
+submiages using the \-S cols:rows option.
+.TP
+.B \-O portrait|landscape|auto
+Set the output orientation of the pages or sections.
+Auto will use the arrangement that requires the fewest pages.
+This option is only meaningful in conjunction with the -P
+option to format an image to fit on a specific paper size.
+.TP
+.B \-P page
+Format the output images to fit on page size paper. Use
+\-P list to show the supported page sizes and dimensions.
+You can define a custom page size by entering the width and length of the
+page in the current units with the following format #.#x#.#.
+.TP
+.B \-S cols:rows
+Divide each image into cols across and rows down equal sections.
+.TP
+.B \-B
+Force output to be written with Big\-Endian byte order.
+This option only has an effect when the output file is created or
+overwritten and not when it is appended to.
+.TP
+.B \-C
+Suppress the use of ``strip chopping'' when reading images
+that have a single strip/tile of uncompressed data.
+.TP
+.B \-c
+Specify the compression to use for data written to the output file:
+.B none
+for no compression,
+.B packbits
+for PackBits compression,
+.B lzw
+for Lempel\-Ziv & Welch compression,
+.B jpeg
+for baseline JPEG compression.
+.B zip
+for Deflate compression,
+.B g3
+for CCITT Group 3 (T.4) compression,
+and
+.B g4
+for CCITT Group 4 (T.6) compression.
+By default
+.I tiffcrop
+will compress data according to the value of the
+.I Compression
+tag found in the source file.
+.IP
+The
+.SM CCITT
+Group 3 and Group 4 compression algorithms can only
+be used with bilevel data.
+.IP
+Group 3 compression can be specified together with several
+T.4\-specific options:
+.B 1d
+for 1\-dimensional encoding,
+.B 2d
+for 2\-dimensional encoding,
+and
+.B fill
+to force each encoded scanline to be zero\-filled so that the
+terminating EOL code lies on a byte boundary.
+Group 3\-specific options are specified by appending a ``:''\-separated
+list to the ``g3'' option; e.g.
+.B "\-c g3:2d:fill"
+to get 2D\-encoded data with byte\-aligned EOL codes.
+.IP
+.SM LZW
+compression can be specified together with a
+.I predictor
+value.
+A predictor value of 2 causes
+each scanline of the output image to undergo horizontal
+differencing before it is encoded; a value
+of 1 forces each scanline to be encoded without differencing.
+LZW\-specific options are specified by appending a ``:''\-separated
+list to the ``lzw'' option; e.g.
+.B "\-c lzw:2"
+for
+.SM LZW
+compression with horizontal differencing.
+.TP
+.B \-f
+Specify the bit fill order to use in writing output data.
+By default,
+.I tiffcrop
+will create a new file with the same fill order as the original.
+Specifying
+.B "\-f lsb2msb"
+will force data to be written with the FillOrder tag set to
+.SM LSB2MSB,
+while
+.B "\-f msb2lsb"
+will force data to be written with the FillOrder tag set to
+.SM MSB2LSB.
+.TP
+.B \-i
+Ignore non\-fatal read errors and continue processing of the input file.
+.TP
+.B \-l
+Specify the length of a tile (in pixels).
+.I Tiffcrop
+attempts to set the tile dimensions so
+that no more than 8 kilobytes of data appear in a tile.
+.TP
+.B \-L
+Force output to be written with Little\-Endian byte order.
+This option only has an effect when the output file is created or
+overwritten and not when it is appended to.
+.TP
+.B \-M
+Suppress the use of memory\-mapped files when reading images.
+.TP
+.B \-p
+Specify the planar configuration to use in writing image data
+that has more than one sample per pixel.
+By default,
+.I tiffcrop
+will create a new file with the same planar configuration as
+the original.
+Specifying
+.B "\-p contig"
+will force data to be written with multi\-sample data packed
+together, while
+.B "\-p separate"
+will force samples to be written in separate planes.
+.TP
+.B \-r
+Specify the number of rows (scanlines) in each strip of data
+written to the output file.
+By default (or when value
+.B 0
+is specified),
+.I tiffcrop
+attempts to set the rows/strip that no more than 8 kilobytes of
+data appear in a strip. If you specify the special value
+.B \-1
+it will results in infinite number of the rows per strip. The entire image
+will be the one strip in that case.
+.TP
+.B \-s
+Force the output file to be written with data organized in strips
+(rather than tiles).
+.TP
+.B \-t
+Force the output file to be written with data organized in tiles
+(rather than strips).
+.TP
+.B \-w
+Specify the width of a tile (in pixels).
+.I tiffcrop
+attempts to set the tile dimensions so
+that no more than 8 kilobytes of data appear in a tile.
+.I tiffcrop
+attempts to set the tile dimensions so
+that no more than 8 kilobytes of data appear in a tile.
+.TP
+Debug and dump facility
+.B \-D opt1:value1,opt2:value2,opt3:value3:opt4:value4
+Display program progress and/or dump raw data to non\-TIFF files.
+Options include the following and must be joined as a comma
+separated list. The use of this option is generally limited to
+program debugging and development of future options. An equal sign
+may be substituted for the colon in option:value pairs.
+.IP
+debug:N Display limited program progress indicators where larger N
+increase the level of detail.
+.IP
+format:txt|raw Format any logged data as ASCII text or raw binary
+values. ASCII text dumps include strings of ones and zeroes representing
+the binary values in the image data plus identifying headers.
+.IP
+level:N Specify the level of detail presented in the dump files.
+This can vary from dumps of the entire input or output image data to dumps
+of data processed by specific functions. Current range of levels is 1 to 3.
+.IP
+input:full\-path\-to\-directory/input\-dumpname
+.IP
+output:full\-path\-to\-directory/output\-dumpname
+.IP
+When dump files are being written, each image will be written to a separate
+file with the name built by adding a numeric sequence value to the dumpname
+and an extension of .txt for ASCII dumps or .bin for binary dumps.
+
+The four debug/dump options are independent, though it makes little sense to
+specify a dump file without specifying a detail level.
+.IP
+Note: Tiffcrop may be compiled with -DDEVELMODE to enable additional very
+ low level debug reporting.
+.SH "EXAMPLES"
+The following concatenates two files and writes the result using
+.SM LZW
+encoding:
+.RS
+.nf
+tiffcrop \-c lzw a.tif b.tif result.tif
+.fi
+.RE
+.PP
+To convert a G3 1d\-encoded
+.SM TIFF
+to a single strip of G4\-encoded data the following might be used:
+.RS
+.nf
+tiffcrop \-c g4 \-r 10000 g3.tif g4.tif
+.fi
+.RE
+(1000 is just a number that is larger than the number of rows in
+the source file.)
+
+To extract a selected set of images from a multi\-image TIFF file
+use the \-N option described above. Thus, to copy the 1st and 3rd
+images of image file "album.tif" to "result.tif":
+.RS
+.nf
+tiffcrop \-N 1,3 album.tif result.tif
+.fi
+.RE
+.PP
+Invert a bilevel image scan of a microfilmed document and crop off margins of
+0.25 inches on the left and right, 0.5 inch on the top, and 0.75 inch on the
+bottom. From the remaining portion of the image, select the second and third
+quarters, ie, one half of the area left from the center to each margin.
+.RS
+tiffcrop \-U in \-m 0.5,0.25,0.75,0.25 \-E left \-Z 2:4,3:4 \-I both MicrofilmNegative.tif MicrofilmPostiveCenter.tif
+.fi
+.RE
+.PP
+Extract only the final image of a large Architectural E sized
+multipage TIFF file and rotate it 90 degrees clockwise while
+reformatting the output to fit on tabloid sized sheets with one
+quarter of an inch on each side:
+.RS
+tiffcrop \-N last \-R 90 \-O auto \-P tabloid \-U in \-J 0.25 \-K 0.25 \-H 300 \-V 300 Big\-PlatMap.tif BigPlatMap\-Tabloid.tif
+.fi
+.RE
+The output images will have a specified resolution of 300 dpi in both
+directions. The orientation of each page will be determined by whichever
+choice requires the fewest pages. To specify a specific orientation, use
+the portrait or landscape option. The paper size option does not resample
+the image. It breaks each original image into a series of smaller images
+that will fit on the target paper size at the specified resolution.
+.fi
+.RE
+.PP
+Extract two regions 2048 pixels wide by 2048 pixels high from each page of
+a multi\-page input file and write each region to a separate output file.
+.RS
+tiffcrop \-U px \-z 1,1,2048,2048:1,2049,2048,4097 \-e separate CheckScans.tiff Check
+.fi
+.RE
+The output file names will use the stem Check with a numeric suffix which is
+incremented for each region of each image, eg Check\-001.tiff, Check\-002.tiff ...
+Check\-NNN.tiff. To produce a unique file for each page of the input image
+with one new image for each region of the input image on that page, change
+the export option to \-e multiple.
+
+.SH "NOTES"
+.PP
+In general, bilevel, grayscale, palette and RGB(A) data with bit depths
+from 1 to 32 bits should work in both interleaved and separate plane
+formats. Unlike tiffcp, tiffcrop can read and write tiled images with
+bits per sample that are not a multiple of 8 in both interleaved and
+separate planar format. Floating point data types are supported at
+bit depts of 16, 24, 32 and 64 bits per sample.
+.PP
+Not all images can be converted from one compression scheme to another.
+Data with some photometric interpretations and/or bit depths are tied to
+specific compression schemes and vice-versa, e.g. Group 3/4 compression
+is only usable for bilevel data. JPEG compression is only useable on 8
+bit per sample data (or 12 bit if
+.I LibTIFF
+was compiled with 12 bit JPEG support). Support for OJPEG compressed
+images is problematic at best. Since OJPEG compression is no longer
+supported for writing images with LibTIFF, these images will be updated
+to the newer JPEG compression when they are copied or processed. This
+may cause the image to appear color shifted or distorted after conversion.
+In some cases, it is possible to remove the original compression from
+image data using the option -cnone.
+.PP
+Tiffcrop does not currently provide options to up or downsample data to
+different bit depths or convert data from one photometric interpretation
+to another, e.g. 16 bits per sample to 8 bits per sample or RGB to grayscale.
+.PP
+Tiffcrop is very loosely derived from code in
+.I tiffcp
+with extensive modifications and additions to support the selection of input
+images and regions and the exporting of them to one or more output files in
+various groupings. The image manipulation routines are entirely new and
+additional ones may be added in the future. It will handle tiled images with
+bit depths that are not a multiple of eight that tiffcp may refuse to read.
+.PP
+.I Tiffcrop
+was designed to handle large files containing many moderate sized images
+with memory usage that is independent of the number of images in the file.
+In order to support compression modes that are not based on individual
+scanlines, e.g. JPEG, it now reads images by strip or tile rather than by
+indvidual scanlines. In addition to the memory required by the input and
+output buffers associated with
+.I LibTIFF
+one or more buffers at least as large as the largest image to be read are
+required. The design favors large volume document processing uses over
+scientific or graphical manipulation of large datasets as might be found
+in research or remote sensing scenarios.
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffinfo (1),
+.BR tiffcmp (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR tiffsplit (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
+
diff --git a/tiff/man/tiffdither.1 b/tiff/man/tiffdither.1
new file mode 100644
index 0000000..0e1294c
--- /dev/null
+++ b/tiff/man/tiffdither.1
@@ -0,0 +1,132 @@
+.\" $Id: tiffdither.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1990-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFDITHER 1 "September 20, 2005" "libtiff"
+.SH NAME
+tiffdither \- convert a greyscale image to bilevel using dithering
+.SH SYNOPSIS
+.B tiffdither
+[
+.I options
+]
+.I input.tif
+.I output.tif
+.SH DESCRIPTION
+.I tiffdither
+converts a single channel 8-bit greyscale image to a bilevel image
+using Floyd-Steinberg error propagation with thresholding.
+.SH OPTIONS
+.TP
+.B \-c
+Specify the compression to use for data written to the output file:
+.B none
+for no compression,
+.B packbits
+for PackBits compression,
+.B lzw
+for Lempel-Ziv & Welch compression,
+.B zip
+for Deflate compression,
+.B g3
+for CCITT Group 3 (T.4) compression,
+and
+.B g4
+for CCITT Group 4 (T.6) compression.
+By default
+.I tiffdither
+will compress data according to the value of the
+.I Compression
+tag found in the source file.
+.IP
+The
+.SM CCITT
+Group 3 and Group 4 compression algorithms can only
+be used with bilevel data.
+.IP
+Group 3 compression can be specified together with several
+T.4-specific options:
+.B 1d
+for 1-dimensional encoding,
+.B 2d
+for 2-dimensional encoding,
+and
+.B fill
+to force each encoded scanline to be zero-filled so that the
+terminating EOL code lies on a byte boundary.
+Group 3-specific options are specified by appending a ``:''-separated
+list to the ``g3'' option; e.g.
+.B "\-c g3:2d:fill"
+to get 2D-encoded data with byte-aligned EOL codes.
+.IP
+.SM LZW
+compression can be specified together with a
+.I predictor
+value.
+A predictor value of 2 causes
+each scanline of the output image to undergo horizontal
+differencing before it is encoded; a value
+of 1 forces each scanline to be encoded without differencing.
+LZW-specific options are specified by appending a ``:''-separated
+list to the ``lzw'' option; e.g.
+.B "\-c lzw:2"
+for
+.SM LZW
+compression with horizontal differencing.
+.TP
+.B \-f
+Specify the bit fill order to use in writing output data.
+By default,
+.I tiffdither
+will create a new file with the same fill order as the original.
+Specifying
+.B "\-f lsb2msb"
+will force data to be written with the
+.I Fill\%Order
+tag set to
+.SM LSB2MSB ,
+while
+.B "\-f msb2lsb"
+will force data to be written with the
+.I Fill\%Order
+tag set to
+.SM MSB2LSB .
+.TP
+.B \-t
+Set the threshold value for dithering.
+By default the threshold value is 128.
+.SH NOTES
+The dither algorithm is taken from the
+.BR tiffmedian (1)
+program (written by Paul Heckbert).
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR fax2tiff (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiff2bw (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffdump.1 b/tiff/man/tiffdump.1
new file mode 100644
index 0000000..fa2c2fe
--- /dev/null
+++ b/tiff/man/tiffdump.1
@@ -0,0 +1,81 @@
+.\" $Id: tiffdump.1,v 1.5 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFDUMP 1 "October 23, 2005" "libtiff"
+.SH NAME
+tiffdump \- print verbatim information about
+.SM TIFF
+files
+.SH SYNOPSIS
+.B tiffdump
+[
+.I options
+]
+.I "name \&..."
+.SH DESCRIPTION
+.I tiffdump
+displays directory information from files created according
+to the Tag Image File Format, Revision 6.0.
+The header of each
+.SM TIFF
+file (magic number, version, and first directory offset)
+is displayed, followed by the tag contents of each directory in the file.
+For each tag, the name, data type, count, and value(s) is displayed.
+When the symbolic name for a tag or data type is known, the symbolic
+name is displayed followed by it's numeric (decimal) value.
+Tag values are displayed enclosed in ``<>'' characters immediately
+preceded by the value of the count field.
+For example, an
+.I ImageWidth
+tag might be displayed as ``ImageWidth (256) SHORT (3) 1<800>''.
+.PP
+.I tiffdump
+is particularly useful for investigating the contents of
+.SM TIFF
+files that
+.I libtiff
+does not understand.
+.SH OPTIONS
+.TP
+.B \-h
+Force numeric data to be printed in hexadecimal rather than the
+default decimal.
+.TP
+.BI \-m " items"
+Change the number of indirect data items that are printed. By default, this
+will be 24.
+.TP
+.BI \-o " offset"
+Dump the contents of the
+.SM IFD
+at the a particular file offset.
+The file offset may be specified using the usual C-style syntax;
+i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal.
+.SH "SEE ALSO"
+.BR tiffinfo (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffgt.1 b/tiff/man/tiffgt.1
new file mode 100644
index 0000000..1d5bb41
--- /dev/null
+++ b/tiff/man/tiffgt.1
@@ -0,0 +1,245 @@
+.\" $Id: tiffgt.1,v 1.4 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFGT 1 "September 20, 2005" "libtiff"
+.SH NAME
+tiffgt \- display an image stored in a
+.SM TIFF
+file (Silicon Graphics version)
+.SH SYNOPSIS
+.B tiffgt
+[
+.I options
+]
+.I "input.tif ..."
+.SH DESCRIPTION
+.I tiffgt
+displays one or more images stored using the
+Tag Image File Format, Revision 6.0.
+Each image is placed in a fixed size window that the
+user must position on the display (unless configured
+otherwise through X defaults).
+If the display has fewer than 24 bitplanes, or if the
+image does not warrant full color, then
+.SM RGB
+color values are mapped to the closest values that exist in
+the colormap (this is done using the
+.I rgbi
+routine found in the graphics utility library
+.BR \-lgutil .)
+.PP
+.I tiffgt
+correctly handles files with any of the following characteristics:
+.sp .5
+.in +0.5i
+.ta \w'\fIPhotometricInterpretation\fP 'u
+.nf
+\fIBitsPerSample\fP 1, 2, 4, 8, 16
+\fISamplesPerPixel\fP 1, 3, 4 (the 4th sample is ignored)
+\fIPhotometricInterpretation\fP 0 (min-is-white), 1 (min-is-black), 2 (RGB), 3 (palette), 6 (YCbCr)
+\fIPlanarConfiguration\fP 1 (contiguous), 2 (separate)
+\fIOrientation\fP 1 (top-left), 4 (bottom-left)
+.fi
+.in -0.5i
+.sp .5
+Data may be organized as strips or tiles and may be
+compressed with any of the compression algorithms supported
+by the
+.IR libtiff (3)
+library.
+.PP
+For palette images (\c
+.IR PhotometricInterpretation =3),
+.I tiffgt
+inspects the colormap values and assumes either 16-bit
+or 8-bit values according to the maximum value.
+That is, if no colormap entry greater than 255 is found,
+.I tiffgt
+assumes the colormap has only 8-bit values; otherwise
+it assumes 16-bit values.
+This inspection is done to handle old images written by
+previous (incorrect) versions of
+.IR libtiff .
+.PP
+.I tiffgt
+can be used to display multiple images one-at-a-time.
+The left mouse button switches the display to the first image in the
+.I next
+file in the list of files specified on the command line.
+The right mouse button switches to the first image in the
+.I previous
+file in the list.
+The middle mouse button causes the first image in the first file
+specified on the command line to be displayed.
+In addition the following keyboard commands are recognized:
+.TP
+.B b
+Use a
+.I PhotometricInterpretation
+of MinIsBlack in displaying the current image.
+.TP
+.B l
+Use a
+.I FillOrder
+of lsb-to-msb in decoding the current image.
+.TP
+.B m
+Use a
+.I FillOrder
+of msb-to-lsb in decoding the current image.
+.TP
+.B c
+Use a colormap visual to display the current image.
+.TP
+.B r
+Use a true color (24-bit RGB) visual to display the current image.
+.TP
+.B w
+Use a
+.I PhotometricInterpretation
+of MinIsWhite in displaying the current image.
+.TP
+.B W
+Toggle (enable/disable) display of warning messages from the
+.SM TIFF
+library when decoding images.
+.TP
+.B E
+Toggle (enable/disable) display of error messages from the
+.SM TIFF
+library when decoding images.
+.TP
+.B z
+Reset all parameters to their default settings (\c
+.IR FillOrder ,
+.IR PhotometricInterpretation ,
+handling of warnings and errors).
+.TP
+.B PageUp
+Display the previous image in the current file or the last
+image in the previous file.
+.TP
+.B PageDown
+Display the next image in the current file or the first image
+in the next file.
+.TP
+.B Home
+Display the first image in the current file.
+.TP
+.B End
+Display the last image in the current file (unimplemented).
+.SH OPTIONS
+.TP
+.B \-c
+Force image display in a colormap window.
+.TP
+.B \-d
+Specify an image to display by directory number.
+By default the first image in the file is displayed.
+Directories are numbered starting at zero.
+.TP
+.B \-e
+Enable reporting of error messages from the
+.SM TIFF
+library.
+By default
+.I tiffgt
+silently ignores images that cannot be read.
+.TP
+.B \-f
+Force
+.I tiffgt
+to run as a foreground process.
+By default
+.I tiffgt
+will place itself in the background once it has opened the
+requested image file.
+.TP
+.B \-l
+Force the presumed bit ordering to be
+.SM LSB
+to
+.SM MSB.
+.TP
+.B \-m
+Force the presumed bit ordering to be
+.SM MSB
+to
+.SM LSB.
+.TP
+.B \-o
+Specify an image to display by directory offset.
+By default the first image in the file is displayed.
+Directories offsets may be specified using C-style syntax;
+i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal.
+.TP
+.B \-p
+Override the value of the
+.I PhotometricInterpretation
+tag; the parameter may be one of:
+.BR miniswhite ,
+.BR minisblack ,
+.BR rgb ,
+.BR palette ,
+.BR mask ,
+.BR separated ,
+.BR ycbcr ,
+and
+.BR cielab .
+.TP
+.B \-r
+Force image display in a full color window.
+.TP
+.B \-s
+Stop on the first read error.
+By default all errors in the input data are ignored and
+.I tiffgt
+does it's best to display as much of an image as possible.
+.TP
+.B \-w
+Enable reporting of warning messages from the
+.SM TIFF
+library.
+By default
+.I tiffgt
+ignores warning messages generated when reading an image.
+.TP
+.B \-v
+Place information in the title bar describing
+what type of window (full color or colormap) is being
+used, the name of the input file, and the directory
+index of the image (if non-zero).
+By default, the window type is not shown in the title bar.
+.SH BUGS
+Images wider and taller than the display are silently truncated to avoid
+crashing old versions of the window manager.
+.SH "SEE ALSO"
+.BR tiffdump (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffinfo.1 b/tiff/man/tiffinfo.1
new file mode 100644
index 0000000..764e473
--- /dev/null
+++ b/tiff/man/tiffinfo.1
@@ -0,0 +1,88 @@
+.\" $Id: tiffinfo.1,v 1.2 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFINFO 1 "November 2, 2005" "libtiff"
+.SH NAME
+tiffinfo \- print information about
+.SM TIFF
+files
+.SH SYNOPSIS
+.B tiffinfo
+[
+.I options
+]
+.I "input.tif \&..."
+.SH DESCRIPTION
+.I Tiffinfo
+displays information about files created according
+to the Tag Image File Format, Revision 6.0.
+By default, the contents of each
+.SM TIFF
+directory in each file
+is displayed, with the value of each tag shown symbolically
+(where sensible).
+.SH OPTIONS
+.TP
+.B \-c
+Display the colormap and color/gray response curves, if present.
+.TP
+.B \-D
+In addition to displaying the directory tags,
+read and decompress all the data in each image (but not display it).
+.TP
+.B \-d
+In addition to displaying the directory tags,
+print each byte of decompressed data in hexadecimal.
+.TP
+.B \-j
+Display any \s-2JPEG\s0-related tags that are present.
+.TP
+.B \-o
+Set the initial
+.SM TIFF
+directory according to the specified file offset.
+The file offset may be specified using the usual C-style syntax;
+i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal.
+.TP
+.B \-s
+Display the offsets and byte counts for each data strip in a directory.
+.TP
+.B \-z
+Enable strip chopping when reading image data.
+.TP
+.B \-#
+Set the initial
+.SM TIFF
+directory to
+.IR # .
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffcp (1),
+.BR tiffcmp (1),
+.BR tiffmedian (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffmedian.1 b/tiff/man/tiffmedian.1
new file mode 100644
index 0000000..ffa6d04
--- /dev/null
+++ b/tiff/man/tiffmedian.1
@@ -0,0 +1,112 @@
+.\" $Id: tiffmedian.1,v 1.3 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1990-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFMEDIAN 1 "November 2, 2005" "libtiff"
+.SH NAME
+tiffmedian \- apply the median cut algorithm to data in a
+.SM TIFF
+file
+.SH SYNOPSIS
+.B tiffmedian
+[
+.I options
+]
+.I input.tif
+.I output.tif
+.SH DESCRIPTION
+.I tiffmedian
+applies the median cut algorithm to an
+.SM RGB
+image in
+.I input.tif
+to generate a palette image that is written to
+.IR output.tif .
+The generated colormap has, by default, 256 entries.
+The image data is quantized by mapping each
+pixel to the closest color values in the colormap.
+.SH OPTIONS
+.TP
+.B \-c
+Specify the compression to use for data written to the output file:
+.B none
+for no compression,
+.B packbits
+for PackBits compression,
+.B lzw
+for Lempel-Ziv & Welch compression,
+and
+.B zip
+for Deflate compression.
+By default
+.I tiffmedian
+will compress data according to the value of the
+.I Compression
+tag found in the source file.
+.IP
+.SM LZW
+compression can be specified together with a
+.I predictor
+value.
+A predictor value of 2 causes
+each scanline of the output image to undergo horizontal
+differencing before it is encoded; a value
+of 1 forces each scanline to be encoded without differencing.
+LZW-specific options are specified by appending a ``:''-separated
+list to the ``lzw'' option; e.g.
+.B "\-c lzw:2"
+for
+.SM LZW
+compression with horizontal differencing.
+.TP
+.B \-C
+Specify the number of entries to use in the generated colormap.
+By default all 256 entries/colors are used.
+.TP
+.B \-f
+Apply Floyd-Steinberg dithering before selecting a colormap entry.
+.TP
+.B \-r
+Specify the number of rows (scanlines) in each strip of data
+written to the output file.
+By default,
+.I tiffmedian
+attempts to set the rows/strip
+that no more than 8 kilobytes of data appear in a strip.
+.SH NOTES
+This program is derived from Paul Heckbert's
+.I median
+program.
+.SH "SEE ALSO"
+.BR pal2rgb (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffcmp (1),
+.BR libtiff (3TIFF)
+.PP
+.BR "Color Image Quantization for Frame Buffer Display",
+Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffset.1 b/tiff/man/tiffset.1
new file mode 100644
index 0000000..6906238
--- /dev/null
+++ b/tiff/man/tiffset.1
@@ -0,0 +1,82 @@
+.\" $Id: tiffset.1,v 1.3 2006/04/20 12:17:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFSET 1 "November 21, 2004" "libtiff"
+.SH NAME
+tiffset \- set a field in a
+.SM TIFF
+header
+.SH SYNOPSIS
+.B tiffset
+[
+.I options
+]
+.I filename.tif
+.SH DESCRIPTION
+.I Tiffset
+sets the value of a
+.SM TIFF
+header to a specified value.
+.SH OPTIONS
+.TP
+.BI \-s " tagnumber" "\fR [\fP" " count" "\fR ]\fP" " value ..."
+Set the value of the named tag to the value or values specified.
+.TP
+.BI \-sf " tagnumber filename"
+Set the value of the tag to the contents of filename. This option is
+supported for ASCII tags only.
+.SH EXAMPLES
+The following example sets the image description tag (270) of a.tif to
+the contents of the file descrip:
+.RS
+.nf
+tiffset \-sf 270 descrip a.tif
+.fi
+.RE
+.PP
+The following example sets the artist tag (315) of a.tif to the string
+``Anonymous'':
+.RS
+.nf
+tiffset \-s 305 Anonymous a.tif
+.fi
+.RE
+.PP
+This example sets the resolution of the file a.tif to 300 dpi:
+.RS
+.nf
+tiffset \-s 296 2 a.tif
+tiffset \-s 282 300.0 a.tif
+tiffset \-s 283 300.0 a.tif
+.fi
+.RE
+.SH "SEE ALSO"
+.BR tiffdump (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffsplit.1 b/tiff/man/tiffsplit.1
new file mode 100644
index 0000000..6495d46
--- /dev/null
+++ b/tiff/man/tiffsplit.1
@@ -0,0 +1,69 @@
+.\" $Id: tiffsplit.1,v 1.5 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1992-1997 Sam Leffler
+.\" Copyright (c) 1992-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFSPLIT 1 "September 20, 2005" "libtiff"
+.SH NAME
+tiffsplit \- split a multi-image
+.SM TIFF
+into single-image
+.SM TIFF
+files
+.SH SYNOPSIS
+.B tiffsplit
+.I src.tif
+[
+.I prefix
+]
+.SH DESCRIPTION
+.I tiffsplit
+takes a multi-directory (page)
+.SM TIFF
+file and creates one or more single-directory (page)
+.SM TIFF
+files from it.
+The output files are given names created by concatenating
+a prefix, a lexically ordered
+suffix in the range [\fIaaa\fP-\fIzzz\fP], the suffix
+.I .tif
+(e.g.
+.IR xaaa.tif ,
+.IR xaab.tif ,
+\...
+.IR xzzz.tif ).
+If a prefix is not specified on the command line,
+the default prefix of
+.I x
+is used.
+.SH OPTIONS
+None.
+.SH BUGS
+Only a select set of ``known tags'' is copied when splitting.
+.SH "SEE ALSO"
+.BR tiffcp (1),
+.BR tiffinfo (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/tiffsv.1 b/tiff/man/tiffsv.1
new file mode 100644
index 0000000..6e0214e
--- /dev/null
+++ b/tiff/man/tiffsv.1
@@ -0,0 +1,142 @@
+.\" $Id: tiffsv.1,v 1.3 2005/11/02 11:07:19 dron Exp $
+.\"
+.\" Copyright (c) 1988-1997 Sam Leffler
+.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFSV 1 "September 20, 2005" "libtiff"
+.SH NAME
+tiffsv \- save an image from the framebuffer in a
+.SM TIFF
+file (Silicon Graphics version)
+.SH SYNOPSIS
+.B tiffsv
+[
+.I options
+]
+.I output.tif
+[
+.I "x1 x2 y1 y2"
+]
+.SH DESCRIPTION
+.I tiffsv
+saves all or part of the framebuffer in a file using the
+Tag Image File Format, Revision 6.0.
+By default, the image is saved with data samples packed (\c
+.IR PlanarConfiguration =1),
+compressed with the Lempel-Ziv & Welch algorithm (\c
+.IR Compression =5),
+and with each strip no more than 8 kilobytes.
+These characteristics can be overridden, or explicitly specified
+with the options described below.
+.SH OPTIONS
+.TP
+.B \-b
+Save the image as a greyscale image
+as if it were processed by
+.IR tiff2bw (1).
+This option is included for compatibility with the standard
+.IR scrsave (6D)
+program.
+.TP
+.B \-c
+Specify the compression to use for data written to the output file:
+.B none
+for no compression,
+.B packbits
+for PackBits compression,
+.B jpeg
+for baseline JPEG compression,
+.B zip
+for Deflate compression,
+and
+.B lzw
+for Lempel-Ziv & Welch compression (default).
+.IP
+.SM LZW
+compression can be specified together with a
+.I predictor
+value.
+A predictor value of 2 causes
+each scanline of the output image to undergo horizontal
+differencing before it is encoded; a value
+of 1 forces each scanline to be encoded without differencing.
+LZW-specific options are specified by appending a ``:''-separated
+list to the ``lzw'' option; e.g.
+.B "\-c lzw:2"
+for
+.SM LZW
+compression with horizontal differencing.
+.TP
+.B \-p
+Specify the planar configuration to use in writing image data.
+By default,
+.I tiffsv
+will create a new file with the data samples packed contiguously.
+Specifying
+.B "\-p contig"
+will force data to be written with multi-sample data packed
+together, while
+.B "\-p separate"
+will force samples to be written in separate planes.
+.TP
+.B \-r
+Specify the number of rows (scanlines) in each strip of data
+written to the output file.
+By default,
+.I tiffsv
+attempts to set the rows/strip
+that no more than 8 kilobytes of data appear in a strip.
+.SH NOTE
+Except for the use of
+.SM TIFF,
+this program is equivalent to the standard
+.I scrsave
+program.
+This means, for example, that you can use it in conjunction with
+the standard
+.IR icut
+program simply by creating a link called
+.IR scrsave ,
+or by creating a shell script called
+.I scrsave
+that invokes
+.I tiffgt
+with the appropriate options.
+.SH BUGS
+If data are saved compressed and in separate planes, then the
+rows in each strip is silently set to one to avoid limitations
+in the
+.BR libtiff (3TIFF)
+library.
+.SH "SEE ALSO"
+.BR scrsave (6D)
+.BR pal2rgb (1),
+.BR tiffdump (1),
+.BR tiffgt (1),
+.BR tiffinfo (1),
+.BR tiffcp (1),
+.BR tiffmedian (1),
+.BR libtiff (3TIFF)
+.PP
+Libtiff library home page:
+.BR http://www.remotesensing.org/libtiff/