[GRASSLIST:4924] Re: best way to save a d.3d snapshot

Glynn Clements glynn.clements at virgin.net
Sun Nov 10 04:43:46 EST 2002

Dan Jacobson wrote:

> Is e.g. ksnapshot the best way to save a d.3d image for presentation
> on a web page? (save, then edit it with gimp); as not as many
> facilities for saving are available as are for usual raster files.

The simplest way to generate images from d.* commands is to use the
PNG driver. If you already have the data displayed on another monitor,
you can use d.save to obtain a script which will re-create the

For the best results, use GD 2.x, as this supports 24-bpp images.

Unfortunately, the Makefile which is supplied with GD 2.x is rather
crude; at a minimum, you need to change the line:

	LINK_SHARED_HEAD=ld -shared
	LINK_SHARED_HEAD=ld -shared -soname libgd.so.2

Otherwise, programs which are linked against the library will use the
first version of libgd which they find, which may not be the right

BTW, you also need to use e.g.


before starting the driver.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-user mailing list