1PCT2RGB(1)                           GDAL                           PCT2RGB(1)
2
3
4

NAME

6       pct2rgb - Convert an 8bit paletted image to 24bit RGB.
7

SYNOPSIS

9          pct2rgb.py [-of format] [-b band] [-rgba] [-pct palette_file] source_file dest_file
10

DESCRIPTION

12       This utility will convert a pseudo-color band on the input file into an
13       output RGB file of the desired format.
14
15       -of <format>
16              Select the output format. Starting with GDAL 2.3, if not  speci‐
17              fied,  the  format is guessed from the extension (previously was
18              GTiff). Use the short format name.
19
20       -b <band>
21              Band to convert to RGB, defaults to 1.
22
23       -rgba  Generate a RGBA file (instead of a RGB file by default).
24
25       -pct <palette_file>
26              Extract the color table from <palette_file> instead  of  getting
27              it  from  <source_file>.  Can be used to have a consistent color
28              table for multiple files.  The <palette_file> must be  either  a
29              raster file in a GDAL supported format with a palette or a color
30              file in a supported format (txt, qml, qlr).
31
32       <source_file>
33              The input file.
34
35       <dest_file>
36              The output RGB file that will be created.
37
38       NOTE: pct2rgb.py is a Python script, and will only  work  if  GDAL  was
39       built with Python support.
40
41       The '-expand rgb|rgba' option of gdal_translate obsoletes that utility.
42

AUTHOR

44       Frank  Warmerdam  <warmerdam@pobox.com>,  Silke  Reimer  <silke@inteva‐
45       tion.de>
46
48       1998-2023
49
50
51
52
53                                 Oct 30, 2023                       PCT2RGB(1)
Impressum