|
kusano |
7d535a |
.\" $Id: tiffmedian.1,v 1.3 2005-11-02 11:07: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 TIFFMEDIAN 1 "November 2, 2005" "libtiff"
|
|
kusano |
7d535a |
.SH NAME
|
|
kusano |
7d535a |
tiffmedian \- apply the median cut algorithm to data in a
|
|
kusano |
7d535a |
.SM TIFF
|
|
kusano |
7d535a |
file
|
|
kusano |
7d535a |
.SH SYNOPSIS
|
|
kusano |
7d535a |
.B tiffmedian
|
|
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 tiffmedian
|
|
kusano |
7d535a |
applies the median cut algorithm to an
|
|
kusano |
7d535a |
.SM RGB
|
|
kusano |
7d535a |
image in
|
|
kusano |
7d535a |
.I input.tif
|
|
kusano |
7d535a |
to generate a palette image that is written to
|
|
kusano |
7d535a |
.IR output.tif .
|
|
kusano |
7d535a |
The generated colormap has, by default, 256 entries.
|
|
kusano |
7d535a |
The image data is quantized by mapping each
|
|
kusano |
7d535a |
pixel to the closest color values in the colormap.
|
|
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 |
and
|
|
kusano |
7d535a |
.B zip
|
|
kusano |
7d535a |
for Deflate compression.
|
|
kusano |
7d535a |
By default
|
|
kusano |
7d535a |
.I tiffmedian
|
|
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 |
.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 \-C
|
|
kusano |
7d535a |
Specify the number of entries to use in the generated colormap.
|
|
kusano |
7d535a |
By default all 256 entries/colors are used.
|
|
kusano |
7d535a |
.TP
|
|
kusano |
7d535a |
.B \-f
|
|
kusano |
7d535a |
Apply Floyd-Steinberg dithering before selecting a colormap entry.
|
|
kusano |
7d535a |
.TP
|
|
kusano |
7d535a |
.B \-r
|
|
kusano |
7d535a |
Specify the number of rows (scanlines) in each strip of data
|
|
kusano |
7d535a |
written to the output file.
|
|
kusano |
7d535a |
By default,
|
|
kusano |
7d535a |
.I tiffmedian
|
|
kusano |
7d535a |
attempts to set the rows/strip
|
|
kusano |
7d535a |
that no more than 8 kilobytes of data appear in a strip.
|
|
kusano |
7d535a |
.SH NOTES
|
|
kusano |
7d535a |
This program is derived from Paul Heckbert's
|
|
kusano |
7d535a |
.I median
|
|
kusano |
7d535a |
program.
|
|
kusano |
7d535a |
.SH "SEE ALSO"
|
|
kusano |
7d535a |
.BR pal2rgb (1),
|
|
kusano |
7d535a |
.BR tiffinfo (1),
|
|
kusano |
7d535a |
.BR tiffcp (1),
|
|
kusano |
7d535a |
.BR tiffcmp (1),
|
|
kusano |
7d535a |
.BR libtiff (3TIFF)
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
.BR "Color Image Quantization for Frame Buffer Display",
|
|
kusano |
7d535a |
Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
Libtiff library home page:
|
|
kusano |
7d535a |
.BR http://www.remotesensing.org/libtiff/
|