Skip to content

r.rgb

Splits a raster map into red, green and blue maps.

r.rgb input=name [red=name] [green=name] [blue=name] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.rgb input=name red=name

grass.script.run_command("r.rgb", input, red=None, green=None, blue=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.rgb", input="name", red="name")

Parameters

input=name [required]
    Name of input raster map
red=name
    Red channel raster map name
green=name
    Green channel raster map name
blue=name
    Blue channel raster map name
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

input : str, required
    Name of input raster map
    Used as: input, raster, name
red : str, optional
    Red channel raster map name
    Used as: output, raster, name
green : str, optional
    Green channel raster map name
    Used as: output, raster, name
blue : str, optional
    Blue channel raster map name
    Used as: output, raster, name
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

r.rgb generates separate red, green and blue maps from a raster map and its associated color table (grey255).

EXAMPLE

g.region raster=elevation -p
r.rgb input=elevation red=elevation.r green=elevation.g blue=elevation.b

In this case r.rgb produces in the current mapset three new raster maps - 'elevation.r', 'elevation.g', 'elevation.b'.

r_rgb_elevation

SEE ALSO

r.composite, r.blend, r.colors, r.mapcalc

AUTHOR

Glynn Clements

SOURCE CODE

Available at: r.rgb source code (history)
Latest change: Thursday Feb 20 12:48:50 2025 in commit 1633be4