Skip to content

r.in.png

Imports non-georeferenced PNG format image.

r.in.png [-fh] input=name output=name [title=string] [gamma=float] [alpha=float] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.in.png input=name output=name

grass.script.run_command("r.in.png", input, output, title=None, gamma=None, alpha=None, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.in.png", input="name", output="name")

Parameters

input=name [required]
    Name of input file
output=name [required]
    Name for output raster map
title=string
    Title for created raster map
gamma=float
    Display gamma
alpha=float
    Alpha threshold
-f
    Create floating-point map (0.0 - 1.0)
-h
    Output image file header only and exit
--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 file
    Used as: input, file, name
output : str, required
    Name for output raster map
    Used as: output, raster, name
title : str, optional
    Title for created raster map
gamma : float, optional
    Display gamma
alpha : float, optional
    Alpha threshold
flags : str, optional
    Allowed values: f, h
    f
        Create floating-point map (0.0 - 1.0)
    h
        Output image file header only and exit
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.in.png imports a non-georeferenced Portable Network Graphics (PNG) image as a GRASS raster map. Georeferencing .wld files are not supported, for that r.import can be used.

NOTES

In order to assign georeferencing after import use r.region.

SEE ALSO

r.import, r.in.gdal, r.out.png, r.region

AUTHORS

Michael Shapiro
Alex Shevlakov
Glynn Clements

SOURCE CODE

Available at: r.in.png source code (history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f