[GRASS-user] How to generate a "bigger PNG file"

Greetings
I’m using r.out.png to generate PNG files from a small patch (like 6x15 pixels) but I’m obtaining a really small PNG file. Sicne I want to display it a little bit bigger in a website I need to “create a bigger (in size) PNG”. What can I do to do this?
One idea was to rescale it in a image processing software but I get a low quality image
Is there any solution by using grass?
Thanks
Luisa

You can simply increase the resolution of your
current working region. Then you will get more
cells (and a bigger image) but exactly the same
information.

Ben

On 11/03/2011 01:16 PM, Luisa Peña wrote:

Greetings
I'm using r.out.png to generate PNG files from a small patch (like 6x15
pixels) but I'm obtaining a really small PNG file. Sicne I want to
display it a little bit bigger in a website I need to "create a bigger
(in size) PNG". What can I do to do this?
One idea was to rescale it in a image processing software but I get a
low quality image
Is there any solution by using grass?
Thanks
Luisa

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer

   benducke@fastmail.fm

Luisa said:

I’m using r.out.png to generate PNG files from a small patch (like 6x15
pixels) but I’m obtaining a really small PNG file. Sicne I want to
display it a little bit bigger in a website I need to “create a bigger
(in size) PNG”. What can I do to do this?

Ben said:

You can simply increase the resolution of your
current working region. Then you will get more
cells (and a bigger image) but exactly the same
information.

Or I guess you could export it with a larger number of pixels by setting some environment variables.

export GRASS_WIDTH=
export GRASS_HEIGHT=

Cheers,
Marcello.

Marcello Gorini wrote:

>>I'm using r.out.png to generate PNG files from a small patch (like 6x15
>>pixels) but I'm obtaining a really small PNG file. Sicne I want to
>>display it a little bit bigger in a website I need to "create a bigger
>>(in size) PNG". What can I do to do this?

Ben said:

>You can simply increase the resolution of your
>current working region. Then you will get more
>cells (and a bigger image) but exactly the same
>information.

Or I guess you could export it with a larger number of pixels by setting
some environment variables.

export GRASS_WIDTH=
export GRASS_HEIGHT=

Those will affect the size of images generated by d.* commands using
the PNG driver. They won't have any effect upon the images generated
by d.out.png.

--
Glynn Clements <glynn@gclements.plus.com>

Glynn Clements wrote:

> export GRASS_WIDTH=
> export GRASS_HEIGHT=

Those will affect the size of images generated by d.* commands using
the PNG driver. They won't have any effect upon the images generated
by d.out.png.

Oops; I meant r.out.png, not d.out.png.

--
Glynn Clements <glynn@gclements.plus.com>

Marcello Gorini wrote:

Or I guess you could export it with a larger number of pixels by setting
some environment variables.

export GRASS_WIDTH=
export GRASS_HEIGHT=

Glynn:

Those will affect the size of images generated by d.* commands using
the PNG driver. They won’t have any effect upon the images generated
by d.out.png.

True, my bad, sorry. Once again, I am so used to use “d.mon star=PNG etc…” that I bypassed the r.out.png part of her e-mail :slight_smile:

Hamish:

The book is good, d.out.file is simply using the PNG driver internally. :slight_smile:

Oh, no, the book is not good… it is awesome! :slight_smile: It has got me going really fast in the beggining and still helps me a lot. The most usefull book I have by far!

n.b. I typically use this when I want to show multiple overlaid rasters
in ps.map, which can only display one raster at a time. d.out.file format=
geotiff then r.in.gdal + r.composite (or ps.map’s rgb instruction).

Thanks for the tip!
Cheers,
Marcello.