.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "PCT2RGB" "1" "Aug 18, 2026" "" "GDAL" .SH NAME pct2rgb \- Convert an 8bit paletted image to 24bit RGB. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX pct2rgb [\-\-help] [\-\-help\-general] [\-of format] [\-b band] [\-rgba] [\-pct palette_file] .EE .UNINDENT .UNINDENT .SH DESCRIPTION .sp This utility will convert a pseudo\-color band on the input file into an output RGB file of the desired format. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 pct2rgb is a Python utility, and is only available if GDAL Python bindings are available. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-help Show this help message and exit .UNINDENT .INDENT 0.0 .TP .B \-\-help\-general Gives a brief usage message for the generic GDAL commandline options and exit. .UNINDENT .INDENT 0.0 .TP .B \-of Select the output format. If not specified, the format is guessed from the extension. Use the short format name. .UNINDENT .INDENT 0.0 .TP .B \-b Band to convert to RGB, defaults to 1. .UNINDENT .INDENT 0.0 .TP .B \-rgba Generate a RGBA file (instead of a RGB file by default). .UNINDENT .INDENT 0.0 .TP .B \-pct Extract the color table from instead of getting it from . Can be used to have a consistent color table for multiple files. The must be either a raster file in a GDAL supported format with a palette or a color file in a supported format (txt, qml, qlr). .UNINDENT .INDENT 0.0 .TP .B The input file. .UNINDENT .INDENT 0.0 .TP .B The output RGB file that will be created. .UNINDENT .sp The \(aq\-expand rgb|rgba\(aq option of \fI\%gdal_translate\fP obsoletes that utility. .SH RETURN STATUS CODE .sp The program returns status code 0 in case of success, and non\-zero in case of error (non\-blocking errors emitted as warnings are considered as a successful execution). .SH AUTHOR Frank Warmerdam , Silke Reimer .SH COPYRIGHT 1998-2026 .\" Generated by docutils manpage writer. .