Name

gplcpt — 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 (1) colour palette (gpl) files to the GMT (1) 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 -o 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.

-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

GIMP (1) , GMT (1) , cptcont (1) .