Render display into image file

Name

display-file : Render display into image file

Synopsis

display-file: [-flushcmd=<command>] [-flushframe=<n>]
              [-flushtime=<t>] [-ppm] [-yuv] <filename>

Description

Renders an image into a file. The file can be a framebuffer device (e.g. /dev/fb0), in which case a reasonable representation of the image will be drawn on the console so long as the program's mode matches the framebuffer's mode.

Note

This target generates no input. The display-multi(7) target can be used in order to see (and control) what the program does (using a normal target) and then generate a snapshot when the program exits.

Options

filename is the file to render the images to. If a non-default file type (ppm or yuv) is specified in other options, then the image will be generated at ggiClose(3) time (unless '-flushtime' or '-flushframe' are specified). Otherwise the file is a custom GGIFILE format and is generated continuously.

-ppm write the file as PPM pixmap. PPM can be easily converted to other formats using pbmtools, cjpeg and other converters.

-yuv write a movie file as YUV stream suitable for processing with e.g. mpeg2enc or ffmpeg. A frame will be written at the times specified in '-flushtime' or '-flushframe'.

The display-file target can be used to generate movies from running LibGGI applications. To do this, either use the yuv format, or set '-flushcmd' to a shell command to execute at the times given by one of the two other parameters. This looks typically like:

ppmtogif foo.ppm > foo.%04d.gif

The command is passed through a printf(3) which has the current count of saved frames as an argument (or rather as 10 arguments to allow a few more complex commands).

The primary file is updated at every n-th invocation of ggiFlush or every t seconds, where t can have fractional components (specified as decimal) before the shell command (if given) is run.

Note, that the invocation of the shell command will slow down the program, so make sure you use a reasonable value, if you use the '-flushtime' argument.

Features

  • DirectBuffer always available.
  • Unaccelerated.