gradient-convert (1) - Linux Manuals

gradient-convert: convert gradients between formats

NAME

gradient-convert - convert gradients between formats

SYNOPSIS

gradient-convert [-b rgb] [-B] [-c] [-f rgb] [-g geometry] [-h] [-i format] [-n rgb] [-o format] [-p] [-T rgb] [-v] [-V] infile outfile

DESCRIPTION

The gradient-convert program converts gradients to other formats. It is a wrapper script which make a number of calls the individual programs from the cptutils package so, for example, to convert an Arcview legend (avl) to a PNG image, the programs avlcpt, cptsvg and svgpng would be called in sequence to generate the required file.

The formats of the mandatory infile and outfile arguments are determined from the file extensions, or can be specified explicitly by the -i and -o options.

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 cpt output.

Note that this only modifies the "background" field in the output cpt file, it does not affect the transparency (see the -T option in that regard).

-B, --burst

Some of the file formats handled by cptutils may contain multiple gradients: the Photoshop (grd) and SVG formats for example. By default, the program will extract only the first gradient from such files; but when the --burst option is selected then all gradients will be extracted. In this case the argument of the outfile argument must be a directory (and that directory should already exist).

-c, --capabilities

Print the capabilites of the program to stdout. This data (in YAML format) may be used to autoconfigure other programs which wish to use this program. The format should be self-explanatory.

-f, --foreground rgb

Set the foreground colour of cpt output.

-g, --geometry widthxheight

Specify the size of the PNG image or SVG preview in pixels.

-h, --help

Brief help.

-i, --input-format format

Specify the format of the input file. Run the program with the --help option for a list of supported formats.

-n, --nan rgb

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

-o, --output-format format

Specify the format of the output file. Run the program with the --help option for a list of supported formats.

-p, --preview

Include a preview in the SVG output. See also the --geometry option.

-T, --transparency rgb

When converting to a format which does not support transparency, replace the transparency with the specified rgb colour.

-v, --verbose

Verbose operation.

-V, --version

Version information.

EXAMPLES

Convert an Arcview Legend to a 200x20 pixel PNG image

  gradient-convert -v -g 200x20 legend.avl legend.png 

CAVEATS

The component programs in the conversion will generally have a number of options available for modifying the conversion behaviour, but only the most-often used of these options can be passed to component programs from gradient-convert.

Note also that those options which are passed to component programs are not checked for relevance. Converting a GMT cpt file to GIMP format while using using the irrelevant -g option will not cause an error, it will simply be ignored.

AUTHOR

J.J. Green