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

NAME

6       rgb2pct - .TH "rgb2pct" 1 "Fri Apr 22 2011" "GDAL"
7

NAME

9       rgb2pct - Convert a 24bit RGB image to 8bit paletted
10

SYNOPSIS

12       rgb2pct.py [-n colors | -pct palette_file] [-of format] source_file dest_file
13

DESCRIPTION

15       This utility will compute an optimal pseudo-color table for a given RGB
16       image using a median cut algorithm on a downsampled RGB histogram. Then
17       it converts the image into a pseudo-colored image using the color
18       table. This conversion utilizes Floyd-Steinberg dithering (error
19       diffusion) to maximize output image visual quality.
20
21       -n colors:
22           Select the number of colors in the generated color table. Defaults
23           to 256. Must be between 2 and 256.
24
25       -pct palette_file:
26           Extract the color table from palette_file instead of computing it.
27           Can be used to have a consistant color table for multiple files.
28
29       -of format:
30           Format to generated (defaults to GeoTIFF). Same semantics as the
31           -of flag for gdal_translate. Only output formats supporting
32           pseudocolor tables should be used.
33
34       source_file:
35           The input RGB file.
36
37       dest_file:
38           The output pseudo-colored file that will be created.
39
40       NOTE: rgb2pct.py is a Python script, and will only work if GDAL was
41       built with Python support.
42

AUTHOR

44       Frank Warmerdam <warmerdam@pobox.com>
45
46
47
48GDAL                            Fri Apr 22 2011                     rgb2pct(1)
Impressum