]> git.saurik.com Git - wxWidgets.git/blob - src/tiff/man/tiffmedian.1
revert r74683, wxTLW has its own {Width,Height}Default()
[wxWidgets.git] / src / tiff / man / tiffmedian.1
1 .\"
2 .\" Copyright (c) 1990-1997 Sam Leffler
3 .\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
4 .\"
5 .\" Permission to use, copy, modify, distribute, and sell this software and
6 .\" its documentation for any purpose is hereby granted without fee, provided
7 .\" that (i) the above copyright notices and this permission notice appear in
8 .\" all copies of the software and related documentation, and (ii) the names of
9 .\" Sam Leffler and Silicon Graphics may not be used in any advertising or
10 .\" publicity relating to the software without the specific, prior written
11 .\" permission of Sam Leffler and Silicon Graphics.
12 .\"
13 .\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14 .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15 .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16 .\"
17 .\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18 .\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19 .\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 .\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21 .\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22 .\" OF THIS SOFTWARE.
23 .\"
24 .if n .po 0
25 .TH TIFFMEDIAN 1 "November 2, 2005" "libtiff"
26 .SH NAME
27 tiffmedian \- apply the median cut algorithm to data in a
28 .SM TIFF
29 file
30 .SH SYNOPSIS
31 .B tiffmedian
32 [
33 .I options
34 ]
35 .I input.tif
36 .I output.tif
37 .SH DESCRIPTION
38 .I tiffmedian
39 applies the median cut algorithm to an
40 .SM RGB
41 image in
42 .I input.tif
43 to generate a palette image that is written to
44 .IR output.tif .
45 The generated colormap has, by default, 256 entries.
46 The image data is quantized by mapping each
47 pixel to the closest color values in the colormap.
48 .SH OPTIONS
49 .TP
50 .B \-c
51 Specify the compression to use for data written to the output file:
52 .B none
53 for no compression,
54 .B packbits
55 for PackBits compression,
56 .B lzw
57 for Lempel-Ziv & Welch compression,
58 and
59 .B zip
60 for Deflate compression.
61 By default
62 .I tiffmedian
63 will compress data according to the value of the
64 .I Compression
65 tag found in the source file.
66 .IP
67 .SM LZW
68 compression can be specified together with a
69 .I predictor
70 value.
71 A predictor value of 2 causes
72 each scanline of the output image to undergo horizontal
73 differencing before it is encoded; a value
74 of 1 forces each scanline to be encoded without differencing.
75 LZW-specific options are specified by appending a ``:''-separated
76 list to the ``lzw'' option; e.g.
77 .B "\-c lzw:2"
78 for
79 .SM LZW
80 compression with horizontal differencing.
81 .TP
82 .B \-C
83 Specify the number of entries to use in the generated colormap.
84 By default all 256 entries/colors are used.
85 .TP
86 .B \-f
87 Apply Floyd-Steinberg dithering before selecting a colormap entry.
88 .TP
89 .B \-r
90 Specify the number of rows (scanlines) in each strip of data
91 written to the output file.
92 By default,
93 .I tiffmedian
94 attempts to set the rows/strip
95 that no more than 8 kilobytes of data appear in a strip.
96 .SH NOTES
97 This program is derived from Paul Heckbert's
98 .I median
99 program.
100 .SH "SEE ALSO"
101 .BR pal2rgb (1),
102 .BR tiffinfo (1),
103 .BR tiffcp (1),
104 .BR tiffcmp (1),
105 .BR libtiff (3TIFF)
106 .PP
107 .BR "Color Image Quantization for Frame Buffer Display",
108 Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.
109 .PP
110 Libtiff library home page:
111 .BR http://www.remotesensing.org/libtiff/