pct2rgb.py

将8位调色板图像转换为24位RGB。

简介

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

描述

此实用程序将把输入文件上的伪色带转换为所需格式的输出RGB文件。

-of <format>

选择输出格式。从GDAL 2.3开始,如果未指定,则从扩展名猜测格式(以前是GTiff)。使用短格式名称。

-b <band>

要转换为RGB的波段,默认为1。

-rgba

生成一个RGB a文件(默认情况下不是RGB文件)。

-pct <palette_file>

Extract the color table from <palette_file> instead of getting it from <source_file>. Can be used to have a consistent color table for multiple files. The <palette_file> 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).

<source_file>

输入文件。

<dest_file>

将创建的输出RGB文件。

注意:pct2rgb.py是一个Python脚本,只有在GDAL是使用Python支持构建的情况下才能工作。

的'-expand rgb | rgba'选项 gdal_translate 淘汰了那个公用事业。