|
roentgen |
b75cab |
.\" $Id: tiffmedian.1,v 1.3 2005-11-02 11:07:19 dron Exp $
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" Copyright (c) 1990-1997 Sam Leffler
|
|
roentgen |
b75cab |
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" Permission to use, copy, modify, distribute, and sell this software and
|
|
roentgen |
b75cab |
.\" its documentation for any purpose is hereby granted without fee, provided
|
|
roentgen |
b75cab |
.\" that (i) the above copyright notices and this permission notice appear in
|
|
roentgen |
b75cab |
.\" all copies of the software and related documentation, and (ii) the names of
|
|
roentgen |
b75cab |
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
|
|
roentgen |
b75cab |
.\" publicity relating to the software without the specific, prior written
|
|
roentgen |
b75cab |
.\" permission of Sam Leffler and Silicon Graphics.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
roentgen |
b75cab |
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
roentgen |
b75cab |
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
|
roentgen |
b75cab |
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
|
roentgen |
b75cab |
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
roentgen |
b75cab |
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
|
roentgen |
b75cab |
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
roentgen |
b75cab |
.\" OF THIS SOFTWARE.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.if n .po 0
|
|
roentgen |
b75cab |
.TH TIFFMEDIAN 1 "November 2, 2005" "libtiff"
|
|
roentgen |
b75cab |
.SH NAME
|
|
roentgen |
b75cab |
tiffmedian \- apply the median cut algorithm to data in a
|
|
roentgen |
b75cab |
.SM TIFF
|
|
roentgen |
b75cab |
file
|
|
roentgen |
b75cab |
.SH SYNOPSIS
|
|
roentgen |
b75cab |
.B tiffmedian
|
|
roentgen |
b75cab |
[
|
|
roentgen |
b75cab |
.I options
|
|
roentgen |
b75cab |
]
|
|
roentgen |
b75cab |
.I input.tif
|
|
roentgen |
b75cab |
.I output.tif
|
|
roentgen |
b75cab |
.SH DESCRIPTION
|
|
roentgen |
b75cab |
.I tiffmedian
|
|
roentgen |
b75cab |
applies the median cut algorithm to an
|
|
roentgen |
b75cab |
.SM RGB
|
|
roentgen |
b75cab |
image in
|
|
roentgen |
b75cab |
.I input.tif
|
|
roentgen |
b75cab |
to generate a palette image that is written to
|
|
roentgen |
b75cab |
.IR output.tif .
|
|
roentgen |
b75cab |
The generated colormap has, by default, 256 entries.
|
|
roentgen |
b75cab |
The image data is quantized by mapping each
|
|
roentgen |
b75cab |
pixel to the closest color values in the colormap.
|
|
roentgen |
b75cab |
.SH OPTIONS
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-c
|
|
roentgen |
b75cab |
Specify the compression to use for data written to the output file:
|
|
roentgen |
b75cab |
.B none
|
|
roentgen |
b75cab |
for no compression,
|
|
roentgen |
b75cab |
.B packbits
|
|
roentgen |
b75cab |
for PackBits compression,
|
|
roentgen |
b75cab |
.B lzw
|
|
roentgen |
b75cab |
for Lempel-Ziv & Welch compression,
|
|
roentgen |
b75cab |
and
|
|
roentgen |
b75cab |
.B zip
|
|
roentgen |
b75cab |
for Deflate compression.
|
|
roentgen |
b75cab |
By default
|
|
roentgen |
b75cab |
.I tiffmedian
|
|
roentgen |
b75cab |
will compress data according to the value of the
|
|
roentgen |
b75cab |
.I Compression
|
|
roentgen |
b75cab |
tag found in the source file.
|
|
roentgen |
b75cab |
.IP
|
|
roentgen |
b75cab |
.SM LZW
|
|
roentgen |
b75cab |
compression can be specified together with a
|
|
roentgen |
b75cab |
.I predictor
|
|
roentgen |
b75cab |
value.
|
|
roentgen |
b75cab |
A predictor value of 2 causes
|
|
roentgen |
b75cab |
each scanline of the output image to undergo horizontal
|
|
roentgen |
b75cab |
differencing before it is encoded; a value
|
|
roentgen |
b75cab |
of 1 forces each scanline to be encoded without differencing.
|
|
roentgen |
b75cab |
LZW-specific options are specified by appending a ``:''-separated
|
|
roentgen |
b75cab |
list to the ``lzw'' option; e.g.
|
|
roentgen |
b75cab |
.B "\-c lzw:2"
|
|
roentgen |
b75cab |
for
|
|
roentgen |
b75cab |
.SM LZW
|
|
roentgen |
b75cab |
compression with horizontal differencing.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-C
|
|
roentgen |
b75cab |
Specify the number of entries to use in the generated colormap.
|
|
roentgen |
b75cab |
By default all 256 entries/colors are used.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-f
|
|
roentgen |
b75cab |
Apply Floyd-Steinberg dithering before selecting a colormap entry.
|
|
roentgen |
b75cab |
.TP
|
|
roentgen |
b75cab |
.B \-r
|
|
roentgen |
b75cab |
Specify the number of rows (scanlines) in each strip of data
|
|
roentgen |
b75cab |
written to the output file.
|
|
roentgen |
b75cab |
By default,
|
|
roentgen |
b75cab |
.I tiffmedian
|
|
roentgen |
b75cab |
attempts to set the rows/strip
|
|
roentgen |
b75cab |
that no more than 8 kilobytes of data appear in a strip.
|
|
roentgen |
b75cab |
.SH NOTES
|
|
roentgen |
b75cab |
This program is derived from Paul Heckbert's
|
|
roentgen |
b75cab |
.I median
|
|
roentgen |
b75cab |
program.
|
|
roentgen |
b75cab |
.SH "SEE ALSO"
|
|
roentgen |
b75cab |
.BR pal2rgb (1),
|
|
roentgen |
b75cab |
.BR tiffinfo (1),
|
|
roentgen |
b75cab |
.BR tiffcp (1),
|
|
roentgen |
b75cab |
.BR tiffcmp (1),
|
|
roentgen |
b75cab |
.BR libtiff (3TIFF)
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.BR "Color Image Quantization for Frame Buffer Display",
|
|
roentgen |
b75cab |
Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
Libtiff library home page:
|
|
roentgen |
b75cab |
.BR http://www.remotesensing.org/libtiff/
|