kusano 7d535a
.\" $Id: tiffdither.1,v 1.4 2006-04-20 12:17:19 dron Exp $
kusano 7d535a
.\"
kusano 7d535a
.\" Copyright (c) 1990-1997 Sam Leffler
kusano 7d535a
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
kusano 7d535a
.\"
kusano 7d535a
.\" Permission to use, copy, modify, distribute, and sell this software and 
kusano 7d535a
.\" its documentation for any purpose is hereby granted without fee, provided
kusano 7d535a
.\" that (i) the above copyright notices and this permission notice appear in
kusano 7d535a
.\" all copies of the software and related documentation, and (ii) the names of
kusano 7d535a
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
kusano 7d535a
.\" publicity relating to the software without the specific, prior written
kusano 7d535a
.\" permission of Sam Leffler and Silicon Graphics.
kusano 7d535a
.\" 
kusano 7d535a
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
kusano 7d535a
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
kusano 7d535a
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
kusano 7d535a
.\" 
kusano 7d535a
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
kusano 7d535a
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
kusano 7d535a
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
kusano 7d535a
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
kusano 7d535a
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
kusano 7d535a
.\" OF THIS SOFTWARE.
kusano 7d535a
.\"
kusano 7d535a
.if n .po 0
kusano 7d535a
.TH TIFFDITHER 1 "September 20, 2005" "libtiff"
kusano 7d535a
.SH NAME
kusano 7d535a
tiffdither \- convert a greyscale image to bilevel using dithering
kusano 7d535a
.SH SYNOPSIS
kusano 7d535a
.B tiffdither
kusano 7d535a
[
kusano 7d535a
.I options
kusano 7d535a
]
kusano 7d535a
.I input.tif
kusano 7d535a
.I output.tif
kusano 7d535a
.SH DESCRIPTION
kusano 7d535a
.I tiffdither
kusano 7d535a
converts a single channel 8-bit greyscale image to a bilevel image
kusano 7d535a
using Floyd-Steinberg error propagation with thresholding.
kusano 7d535a
.SH OPTIONS
kusano 7d535a
.TP
kusano 7d535a
.B \-c
kusano 7d535a
Specify the compression to use for data written to the output file:
kusano 7d535a
.B none 
kusano 7d535a
for no compression,
kusano 7d535a
.B packbits
kusano 7d535a
for PackBits compression,
kusano 7d535a
.B lzw
kusano 7d535a
for Lempel-Ziv & Welch compression,
kusano 7d535a
.B zip
kusano 7d535a
for Deflate compression,
kusano 7d535a
.B g3
kusano 7d535a
for CCITT Group 3 (T.4) compression,
kusano 7d535a
and
kusano 7d535a
.B g4
kusano 7d535a
for CCITT Group 4 (T.6) compression.
kusano 7d535a
By default
kusano 7d535a
.I tiffdither
kusano 7d535a
will compress data according to the value of the
kusano 7d535a
.I Compression
kusano 7d535a
tag found in the source file.
kusano 7d535a
.IP
kusano 7d535a
The
kusano 7d535a
.SM CCITT
kusano 7d535a
Group 3 and Group 4 compression algorithms can only
kusano 7d535a
be used with bilevel data.
kusano 7d535a
.IP
kusano 7d535a
Group 3 compression can be specified together with several
kusano 7d535a
T.4-specific options:
kusano 7d535a
.B 1d
kusano 7d535a
for 1-dimensional encoding,
kusano 7d535a
.B 2d
kusano 7d535a
for 2-dimensional encoding,
kusano 7d535a
and
kusano 7d535a
.B fill
kusano 7d535a
to force each encoded scanline to be zero-filled so that the
kusano 7d535a
terminating EOL code lies on a byte boundary.
kusano 7d535a
Group 3-specific options are specified by appending a ``:''-separated
kusano 7d535a
list to the ``g3'' option; e.g.
kusano 7d535a
.B "\-c g3:2d:fill"
kusano 7d535a
to get 2D-encoded data with byte-aligned EOL codes.
kusano 7d535a
.IP
kusano 7d535a
.SM LZW
kusano 7d535a
compression can be specified together with a 
kusano 7d535a
.I predictor
kusano 7d535a
value.
kusano 7d535a
A predictor value of 2 causes
kusano 7d535a
each scanline of the output image to undergo horizontal
kusano 7d535a
differencing before it is encoded; a value
kusano 7d535a
of 1 forces each scanline to be encoded without differencing.
kusano 7d535a
LZW-specific options are specified by appending a ``:''-separated
kusano 7d535a
list to the ``lzw'' option; e.g.
kusano 7d535a
.B "\-c lzw:2"
kusano 7d535a
for
kusano 7d535a
.SM LZW
kusano 7d535a
compression with horizontal differencing.
kusano 7d535a
.TP
kusano 7d535a
.B \-f
kusano 7d535a
Specify the bit fill order to use in writing output data.
kusano 7d535a
By default,
kusano 7d535a
.I tiffdither
kusano 7d535a
will create a new file with the same fill order as the original.
kusano 7d535a
Specifying
kusano 7d535a
.B "\-f lsb2msb"
kusano 7d535a
will force data to be written with the
kusano 7d535a
.I Fill\%Order
kusano 7d535a
tag set to
kusano 7d535a
.SM LSB2MSB ,
kusano 7d535a
while
kusano 7d535a
.B "\-f msb2lsb"
kusano 7d535a
will force data to be written with the
kusano 7d535a
.I Fill\%Order
kusano 7d535a
tag set to
kusano 7d535a
.SM MSB2LSB .
kusano 7d535a
.TP
kusano 7d535a
.B \-t
kusano 7d535a
Set the threshold value for dithering.
kusano 7d535a
By default the threshold value is 128.
kusano 7d535a
.SH NOTES
kusano 7d535a
The dither algorithm is taken from the
kusano 7d535a
.BR tiffmedian (1)
kusano 7d535a
program (written by Paul Heckbert).
kusano 7d535a
.SH "SEE ALSO"
kusano 7d535a
.BR pal2rgb (1),
kusano 7d535a
.BR fax2tiff (1),
kusano 7d535a
.BR tiffinfo (1),
kusano 7d535a
.BR tiffcp (1),
kusano 7d535a
.BR tiff2bw (1),
kusano 7d535a
.BR libtiff (3TIFF)
kusano 7d535a
.PP
kusano 7d535a
Libtiff library home page:
kusano 7d535a
.BR http://www.remotesensing.org/libtiff/