[GRASS-user] r.out.gdal CREATEOPT for PNG/JPG needed

Hamish hamish_b at yahoo.com
Fri Jul 3 10:13:37 EDT 2009


Hi Peter,

peter.loewe wrote:
> the straightforward approach to write out a raster to
> either a JPG or a PNG via r.out.gdal WITHOUT additional
> createopt-parameters results in errors (r.out.png works fine
> ,though).
> 
> Where are the missing parameters documented? Are there
> examples anywhere ?(couldn't find any)

do you mean these errors:

G65> r.out.gdal in=elevation.dem out=elevdem.jpg format=JPEG
Driver <JPEG> does not support direct writing. Using MEM driver for
intermediate dataset.
Exporting to GDAL data type: UInt16
 100%
Input raster map contains cells with NULL-value (no-data). The value 0 was
used to represent no-data values in the input map. You can specify a nodata
value with the nodata option.
Warning 6: JPEG driver ignores color table. The source raster band will be considered as grey level.

r.out.gdal complete.

(only NULL/non-NULL image created)


G65> r.out.gdal in=elevation.dem out=elevdem.png format=PNG
Driver <PNG> does not support direct writing. Using MEM driver for
intermediate dataset.
Exporting to GDAL data type: UInt16
 100%
Input raster map contains cells with NULL-value (no-data). The value 0 was
used to represent no-data values in the input map. You can specify a nodata
value with the nodata option.
ERROR 1: libpng: Invalid color type/bit depth combination in IHDR
ERROR: Unable to create raster map <elevdem.png> using driver <PNG>


see also d.out.file in grass 6.4 and 6.5.


Hamish



      



More information about the grass-user mailing list