1TIFFMEDIAN(1)               General Commands Manual              TIFFMEDIAN(1)
2
3
4

NAME

6       tiffmedian - apply the median cut algorithm to data in a TIFF file
7

SYNOPSIS

9       tiffmedian [ options ] input.tif output.tif
10

DESCRIPTION

12       tiffmedian  applies  the  median  cut  algorithm  to  an  RGB  image in
13       input.tif to generate a palette image that is  written  to  output.tif.
14       The generated colormap has, by default, 256 entries.  The image data is
15       quantized by mapping each pixel to the closest color values in the col‐
16       ormap.
17

OPTIONS

19       -c     Specify  the  compression  to use for data written to the output
20              file: none for no compression, packbits  for  PackBits  compres‐
21              sion,  lzw  for  Lempel-Ziv  &  Welch  compression,  and zip for
22              Deflate compression.  By default tiffmedian will  compress  data
23              according  to  the  value  of  the  Compression tag found in the
24              source file.
25
26              LZW compression can  be  specified  together  with  a  predictor
27              value.   A predictor value of 2 causes each scanline of the out‐
28              put image  to  undergo  horizontal  differencing  before  it  is
29              encoded; a value of 1 forces each scanline to be encoded without
30              differencing.  LZW-specific options are specified by appending a
31              ``:''-separated  list  to the ``lzw'' option; e.g.  -c lzw:2 for
32              LZW compression with horizontal differencing.
33
34       -C     Specify the number of entries to use in the generated  colormap.
35              By default all 256 entries/colors are used.
36
37       -f     Apply  Floyd-Steinberg  dithering  before  selecting  a colormap
38              entry.
39
40       -r     Specify the number of rows (scanlines) in  each  strip  of  data
41              written  to the output file.  By default, tiffmedian attempts to
42              set the rows/strip that no more than 8 kilobytes of data  appear
43              in a strip.
44

NOTES

46       This program is derived from Paul Heckbert's median program.
47

SEE ALSO

49       pal2rgb(1), tiffinfo(1), tiffcp(1), tiffcmp(1), libtiff(3TIFF)
50
51       Color  Image Quantization for Frame Buffer Display, Paul Heckbert, SIG‐
52       GRAPH proceedings, 1982, pp. 297-307.
53
54       Libtiff library home page: http://www.remotesensing.org/libtiff/
55
56
57
58libtiff                        November 2, 2005                  TIFFMEDIAN(1)
Impressum