cfdg1
Image generator based on context-free grammars
Usage
cfdg [options]
input.cfdg
[output.png/svg/mov]
Overview
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.
Options
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.
-
-w WIDTH, --width=WIDTH -
Set width of the output image in pixels (for PNG) or millimeters (for SVG) (default: 500).
-
-h HEIGHT, --height=HEIGHT -
Set height of the output image in pixels (for PNG) or millimeters (for SVG) (default: 500).
-
-s SIZE, --size=SIZE -
Set both width and height of the output image in pixels (for PNG) or millimeters (for SVG) to the same value.
-
-s WIDTHxHEIGHT, --size=WIDTHxHEIGHT -
Set both width and height of the output image in pixels (for PNG) or millimeters (for SVG).
-
-T SIZE, --tile=SIZE -
Multiply both width and height of the tiled output image by the same amount.
-
-T WIDTHxHEIGHT, --tile=WIDTHxHEIGHT -
Multiply both width and height of the tiled output image by the given amounts.
-
-m MAXSHAPES, --maxshapes=MAXSHAPES -
Set the maximum number of shapes rendered (default: no maximum).
-
-x MINIMUMSIZE, --minimumsize=MINIMUMSIZE -
Set the minimum size for a shape to be rendered in pixels/mm (default: 0.3).
-
-b BORDERSIZE, --bordersize=BORDERSIZE -
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.
-
-v VARIATION, --variation=VARIATION -
Set the variation code (default: random). This code determines what the final image will look like when the input contains non-deterministic rules.
-
-DNAME=VALUE -
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.
-
-o NAMETEMPLATE, --outputtemplate=NAMETEMPLATE -
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 %.
-
-a NUM, --animate=NUM -
Generate NUM animation frames at 15 fps.
-
-a TIMExFPS, --animate=TIMExFPS -
Generate TIME x FPS animation frames at the specified fps.
-
-f FRAME, --frame=FRAME -
Generate animation FRAME only.
-
-z, --zoom -
Zoom out during animation, when producing an animation using
-a.
-
-V, --svg -
Generate SVG (vector) output.
-
-Q, --quicktime -
Generate Quicktime movie output.
-
--prores -
Generate Quicktime movie output using the ProRes codec instead of the H.264 codec.
--display=DISPLAY EXECUTABLE-
Display output with specified program.
-
-c, --crop -
Crop image output.
-
-q, --quiet -
Quiet mode; suppress non-error output.
-
-C, --check -
Check the syntax of the cfdg file, then exit.
-
-t, --time -
Time output; output the time taken to render the cfdg file.
-
-d, --cleanup -
Delete old temporary files.
-
-P, --paramdebug -
Enable debug mode to test if all parameter blocks are deallocated.
-
-?, --help -
Show summary of options.
Releases
7 releases since Debian 6.0 (Squeeze); the text changed 4 times.
--animate since Debian 10 (Buster);
--bordersize since Debian 10 (Buster);
--check since Debian 10 (Buster);
--cleanup since Debian 10 (Buster);
--crop since Debian 10 (Buster);
--frame since Debian 10 (Buster);
--height since Debian 10 (Buster);
--help since Debian 10 (Buster);
--maxshapes since Debian 10 (Buster);
--minimumsize since Debian 10 (Buster);
--outputtemplate since Debian 10 (Buster);
--paramdebug since Debian 10 (Buster);
--prores since Debian 10 (Buster);
--quicktime since Debian 10 (Buster);
--quiet since Debian 10 (Buster);
--size since Debian 10 (Buster);
--svg since Debian 10 (Buster);
--tile since Debian 10 (Buster);
--time since Debian 10 (Buster);
--variation since Debian 10 (Buster);
--width since Debian 10 (Buster);
--zoom since Debian 10 (Buster);
-C since Debian 8 (Jessie);
-D since Debian 11 (Bullseye);
-P since Debian 10 (Buster);
-Q since Debian 8 (Jessie);
-T since Debian 10 (Buster);
-a since Debian 10 (Buster);
-b since Debian 10 (Buster);
-d since Debian 10 (Buster);
-f since Debian 10 (Buster);
-h since Debian 10 (Buster);
-m since Debian 10 (Buster);
-o since Debian 10 (Buster);
-s since Debian 10 (Buster);
-t since Debian 8 (Jessie);
-v since Debian 10 (Buster);
-w since Debian 10 (Buster);
-x since Debian 10 (Buster).
-L until Debian 7 (Wheezy).