gplcpt - Man Page

convert GIMP colour palette (gpl) to GMT colour palette table (cpt).

Synopsis

gplcpt [-b rgb] [-f rgb] [-h] [-n rgb] [-o path] [-v] [-V] [-z] [-4] [-5] [-6] [path]

Description

The gplcpt program converts GIMP colour palette (gpl) files to the GMT colour palette table (cpt) format. The output is a piecewise constant (step or discrete) gradient. One could use cptcont(1) program to convert the output to a continuous cpt file if so desired.

The program will read from stdin if a file is not specified as the final argument, and write to stdout if the --output option is not specified.

Options

In the following, all rgb specifications should be of the form red/green/blue where the colour components are integers in the range 0 to 255.

-b,  --background rgb

Set the background colour of the output.

--backtrace-file path

Specify a file to which to write a formatted backtrace. The file will only be created if there is a backtrace created, typically when an error occurs.

--backtrace-format format

Specify the format of the backtrace written to the files specified by --backtrace-file, one of plain, xml or json.

--comments-generate

Create a comment with summary data (the date of creation, name and version of the cptutils package) in the output file.

--comments-read path

Read the comments from the specified path and add them to the output gradient.

The format is simply a plain text multi-line document without any comment delimiters (those will be added by the program).

-f,  --foreground rgb

Set the foreground colour of the output.

-h,  --help

Brief help.

-n,  --nan rgb

Set the NaN (no data) colour of the output.

-o,  --output path

Write the output to path, rather than stdout.

-v,  --verbose

Verbose operation.

-V,  --version

Version information.

-z,  --z-normalise

Normalise the z-values in the cpt output into the range 0/1 and add a RANGE directive. This is the form used in GMT master files.

This option requires that output cpt version is at least 5.

-4,  --gmt4

Use GMT 4 conventions when writing the cpt output: the colour-model code is uppercase, and the colours are separated by spaces.

This is incompatible with the -5 and -6 options of course.

At present this option is the default, but that will change at some point. So specify this option if your use of the output depends on the GMT 4 layout (consumed by a custom parser, for example).

-5,  --gmt5

Use GMT 5 conventions when writing the cpt output: the colour-model code is lowercase, and the colours are separated by a solidus for RGB, CMYK, by a dash for HSV.

This is incompatible with the -4 and -6 options of course.

-6,  --gmt6

As the -5 option, but allows the HARD_HINGE and SOFT_HINGE directives in place of the explicit HINGE = directive.

This is incompatible with the -4 and -5 options of course.

Author

J.J. Green

See Also

cptcont(1).

Info

9 July 2024 cptutils 1.82 User commands