DOKK / manpages / debian 12 / contextfree / cfdg.1.en
CONTEXTFREE(1) Context Free CONTEXTFREE(1)

cfdg - image generator based on context-free grammars

cfdg [options] input.cfdg [output.png/svg/mov]

Context Free is a system that produces images based on context-free grammars. cfdg is the command-line program to generate the actual images (in PNG or SVG format) from the input.cfdg file containing these grammars. Cfdg files can also be animated. The output can either be PNG files of individual frames or as a QuickTime .mov file. If - is specified instead of an input file, the grammar is read from standard input. The output filename can be left out if the -o/--outputtemplate option or -C/--check option is used. If the --display option is specified and there is no output file then the output is saved in a temporary file. Note that the output mode (PNG, SVG, or MOV) is not detected depending on the specified extension, but must be explicitly set using the -V/--svg or -Q/--quicktime option.

All command-line options consist of a single letter, and an optional argument. Longer "GNU-style" options exist as well. A summary of options supported by cfdg is included below.

Set width of the output image in pixels (for PNG) or millimeters (for SVG) (default: 500).
Set height of the output image in pixels (for PNG) or millimeters (for SVG) (default: 500).
Set both width and height of the output image in pixels (for PNG) or millimeters (for SVG) to the same value.
Set both width and height of the output image in pixels (for PNG) or millimeters (for SVG).
Multiply both width and height of the tiled output image by the same amount.
Multiply both width and height of the tiled output image by the given amounts.
Set the maximum number of shapes rendered (default: no maximum).
Set the minimum size for a shape to be rendered in pixels/mm (default: 0.3).
Set the border size: -1 for a -8 pixel border, 0 for no border, 1 for an 8 pixel border, or 2 for a variable-sized border.
Set the variation code (default: random). This code determines what the final image will look like when the input contains non-deterministic rules.
Declare a variable, configuration, or function. Any declaration that can be made at global scope can be entered at the command line with this option. Command line declarations override any global-scope declarations in the cfdg file with the same name. Note that function declarations require a space-delimited type identifier in front, so quotes would be required to force the shell to group the function declaration parts as one entity.
Set the output filename. In this filename, %f is replaced by the animation frame number (if any), %v and %V are replaced by the variation code (in lower or upper case, respectively), and %% is replaced by a literal %.
Generate NUM animation frames at 15 fps.
Generate TIME x FPS animation frames at the specified fps.
Generate animation FRAME only.
Zoom out during animation, when producing an animation using -a.
Generate SVG (vector) output.
Generate Quicktime movie output.
Generate Quicktime movie output using the ProRes codec instead of the H.264 codec.
Display output with specified program.
Crop image output.
Quiet mode; suppress non-error output.
Check the syntax of the cfdg file, then exit.
Time output; output the time taken to render the cfdg file.
Delete old temporary files.
Enable debug mode to test if all parameter blocks are deallocated.
-?, --help
Show summary of options.

More information can be found on the Context Free website, at https://www.contextfreeart.org/index.html

Context Free was written by Chris Coyne, John Horigan and Mark Lentczner.

This manual page was written by Bram Senders <bram@luon.net>, for the Debian project (but may be used by others).

2020-04-04 3.3.1