---
name: "display-file"
section: "7ggi"
platform: "linux"
package: "libggi2"
version: "1:2.0.1-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/display-file/7ggi"
---

# display-file(7ggi)

Render display into image file

## NAME

display-file - Render display into image file

## SYNOPSIS

**display-file** **:** \[ **-flushcmd="***command to execute***"** \]  \[ **-flushframe=***n* \]  \[ **-flushtime=***t* \]  *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 **multi** 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 the filename is a PPM file (has the extension *.ppm*), then the image will be generated at **ggiClose** time. Otherwise the file is a custom \`GGIFILE' format and is generated continuously.

The **file** target can be used to generate movies from running LibGGI applications. To do this, 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)](/printf/3.md) which has the current count of saved frames as an argument (or rather as 10 arguments to allow a few more complex commands).

This shell command is either executed at every *n*-th invocation of ggiFlush or every *t* seconds, where *t* can have fractional components (specified as decimal).

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.

The primary file is updated before every invocation of the shell command.

## FEATURES

DirectBuffer always available.

Unaccelerated.
