Blame man/tiffdither.1

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