[GRASS-dev] Re: [GRASS GIS] #967: r.out.png: respect TRANSPARENT and
COMPRESSION enviro vars
GRASS GIS
trac at osgeo.org
Mon Mar 1 11:06:46 EST 2010
#967: r.out.png: respect TRANSPARENT and COMPRESSION enviro vars
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev at lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: r.out.png
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by glynn):
Replying to [comment:6 hamish]:
> > png_set_bKGD()
>
> changed to use that in r41241, but I'm still getting a segfault.
confused by the layers of structs and `^usage`.
The (pointer) variable isn't being initialised. Use a structure and pass
its address:
{{{
png_color_16 background_color;
background_color.red = (png_uint_16)def_red;
background_color.green = (png_uint_16)def_grn;
background_color.blue = (png_uint_16)def_blu;
png_set_bKGD(png_ptr, info_ptr, &background_color);
}}}
> ps- what does r.in.png do which r.in.gdal doesn't?
Provides more options, e.g. gamma correction, conversion to float. Also,
by default it imports the raw values rather than expanding to bytes.
> is PNG a flexible enough format to help with the 6-7 raster format
transition | grass-gdal driver plugin | r.external ?
No, it's limited to 16-bit integers.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/967#comment:7>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list