[GRASS-dev] animation missing pnmscale

Glynn Clements glynn at gclements.plus.com
Sun Sep 9 10:02:00 EDT 2007


Michael Barton wrote:

> I've made a lot of progress getting your TclTk replacement for Xganim into
> the GUI. However, I haven't been able to make it animate anything. I finally
> tracked this down to the line...
> 
> catch {exec r.out.ppm input=$name output=- 2>@stderr | pnmscale $vscale
> >$tmpfile 2>@stderr}
> 
> This requires a program pnmscale. I don't have pnmscale. Does it comes with
> GRASS and I somehow don't have it or is it a 3rd party program?

xganim.tcl can probably be modified to rescale the image itself, using
the -zoom and -subsample options to the "copy" image command (see the
photo(n) manpage), but that will probably be slower than using
pnmscale.

Also, I don't think that those options can be combined, so you would
have to zoom the image first then subsample the zoomed image. One
consequence is that it may not be practical to get the exact size
required (the zoom factor needs to be reasonably small to avoid
creating a huge intermediate image).

If the lack of pnmscale is the only issue, I can create a local
version.

The main question is whether the Tcl/Tk version is fast enough to act
as a replacement for xganim. When I originally posted it, the comments
suggested that the speed difference was enough that xganim needed to
be retained.

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




More information about the grass-dev mailing list