user-interfaceanimationgifrastergrass

GRASS g.gui.animation: change resolution and add text


I'm using the comand "g.gui.animation" in GRASS 7.0 to plot some raster maps (with no time information) that represent the timing evolution of a physical experiment.

In detail, I'm using the instruction "g.gui.animation raster=map1,map2,map3" and then I change the parameters using the graphic interface.I export the result as a GIF animated image.

It works, but I have two questions about how to improve the quality:

  1. Can I set the resolution (number of pixels) of the output?
  2. I'd like to add some text (that change during the animation according with the frames) somewhere in the image, like the number of the frame. Can I do it with GRASS or I have to use other software (some advice?) in postprocessing? I need to read the text information from a .txt because I have a lot of frames, so it's almost impossible to do it manually.

Thanks for your help.


Solution

  • Can I set the resolution (number of pixels) of the output?

    Unfortunately no, you have to stretch the window and rerender to get larger image. Also make sure your computational region resolution is set high enough.

    I'd like to add some text...

    Not implemented yet (works only for timestamp when using time series). But I would suggest to use imagemagick for such task. Export the data as series of images and then add your text into each image and create animated GIF. For example:

    convert figure.png -fill black -pointsize 20 -annotate +180+390 'Text' figure_with_text.png
    

    and then put together:

    convert -delay 1x3  figure1.png figure2.png figure3.png anim.gif
    

    To get most control of the rendering, you can use d.mon command in GRASS.

    If you have further questions, I would suggest to continue on GRASS-users mailing list.