OS Manuals

/usr/bin/potrace

Utility for tracing a bitmaps

From potrace 1.16-r10 (os), captured 2026-11-05 by running potrace --help (exit 0). permalink

potrace 1.16. Transforms bitmaps into vector graphics.

Usage: potrace [options] [filename...]
General options:
 -h, --help                 - print this help message and exit
 -v, --version              - print version info and exit
 -l, --license              - print license info and exit
File selection:
 <filename>                 - an input file
 -o, --output <filename>    - write all output to this file
 --                         - end of options; 0 or more input filenames follow
Backend selection:
 -b, --backend <name>       - select backend by name
 -b svg, -s, --svg          - SVG backend (scalable vector graphics)
 -b pdf                     - PDF backend (portable document format)
 -b pdfpage                 - fixed page-size PDF backend
 -b eps, -e, --eps          - EPS backend (encapsulated PostScript) (default)
 -b ps, -p, --postscript    - PostScript backend
 -b pgm, -g, --pgm          - PGM backend (portable greymap)
 -b dxf                     - DXF backend (drawing interchange format)
 -b geojson                 - GeoJSON backend
 -b gimppath                - Gimppath backend (GNU Gimp)
 -b xfig                    - XFig backend
Algorithm options:
 -z, --turnpolicy <policy>  - how to resolve ambiguities in path decomposition
 -t, --turdsize <n>         - suppress speckles of up to this size (default 2)
 -a, --alphamax <n>         - corner threshold parameter (default 1)
 -n, --longcurve            - turn off curve optimization
 -O, --opttolerance <n>     - curve optimization tolerance (default 0.2)
 -u, --unit <n>             - quantize output to 1/unit pixels (default 10)
 -d, --debug <n>            - produce debugging output of type n (n=1,2,3)
Scaling and placement options:
 -P, --pagesize <format>    - page size (default is letter)
 -W, --width <dim>          - width of output image
 -H, --height <dim>         - height of output image
 -r, --resolution <n>[x<n>] - resolution (in dpi) (dimension-based backends)
 -x, --scale <n>[x<n>]      - scaling factor (pixel-based backends)
 -S, --stretch <n>          - yresolution/xresolution
 -A, --rotate <angle>       - rotate counterclockwise by angle
 -M, --margin <dim>         - margin
 -L, --leftmargin <dim>     - left margin
 -R, --rightmargin <dim>    - right margin
 -T, --topmargin <dim>      - top margin
 -B, --bottommargin <dim>   - bottom margin
 --tight                    - remove whitespace around the input image
Color options, supported by some backends:
 -C, --color #rrggbb        - set foreground color (default black)
 --fillcolor #rrggbb        - set fill color (default transparent)
 --opaque                   - make white shapes opaque
SVG options:
 --group                    - group related paths together
 --flat                     - whole image as a single path
Postscript/EPS/PDF options:
 -c, --cleartext            - do not compress the output
 -2, --level2               - use postscript level 2 compression (default)
 -3, --level3               - use postscript level 3 compression
 -q, --longcoding           - do not optimize for file size
PGM options:
 -G, --gamma <n>            - gamma value for anti-aliasing (default 2.2)
Frontend options:
 -k, --blacklevel <n>       - black/white cutoff in input file (default 0.5)
 -i, --invert               - invert bitmap
Progress bar options:
 --progress                 - show progress bar
 --tty <mode>               - progress bar rendering: vt100 or dumb

Dimensions can have optional units, e.g. 6.5in, 15cm, 100pt.
Default is inches (or pixels for pgm, dxf, and gimppath backends).
Possible input file formats are: pnm (pbm, pgm, ppm), bmp.
Backends are: svg, pdf, pdfpage, eps, postscript, ps, dxf, geojson, pgm,
gimppath, xfig.
Options (38)
OptionDescriptionSource
-h, --help- print this help message and exithelp + man
-v, --version- print version info and exithelp + man
-l, --license- print license info and exithelp + man
-o, --output filename- write all output to this filehelp + man
-b, --backend nameSelect backend by name, where name is one of eps, postscript, ps, pdf, pdfpage, svg, dxf, geojson, pgm, gimppath, xfig.help + man
-z, --turnpolicy policyspecify how to resolve ambiguities in path decomposition.help + man
-t, --turdsize n- suppress speckles of up to this size (default 2)help + man
-a, --alphamax n- corner threshold parameter (default 1)help + man
-n, --longcurve- turn off curve optimizationhelp + man
-O, --opttolerance n- curve optimization tolerance (default 0.2)help + man
-u, --unit n- quantize output to 1/unit pixels (default 10)help + man
-d, --debug n- produce debugging output of type n (n=1,2,3)help + man
-P, --pagesize formatfor fixed-size backends, set page size.help + man
-W, --width dimset the width of output image (before any rotation and margins).help + man
-H, --height dimset the height of output image.help + man
-x, --scale n>[x<n- scaling factor (pixel-based backends)help
-S, --stretch n- yresolution/xresolutionhelp + man
-A, --rotate angleset the rotation angle (in degrees).help + man
-M, --margin dimset all four margins.help + man
-L, --leftmargin dimset the left margin.help + man
-R, --rightmargin dimset the right margin.help + man
-T, --topmargin dimset the top margin.help + man
-B, --bottommargin dimset the bottom margin.help + man
--tightremove whitespace around the image before scaling and margins are applied.help + man
-C, --color #rrggbbset the foreground color of the output image.help + man
--fillcolor #rrggbbset the fill color of the output image, i.e., the color of the "white" parts that are enclosed by "black" parts.help + man
--opaquefill in the white parts of the image opaquely, instead of leaving them transparent.help + man
--groupfor SVG output, try to group related paths together.help + man
--flatfor SVG output, put the entire image into a single path.help + man
-c, --cleartext- do not compress the outputhelp + man
-2, --level2- use postscript level 2 compression (default)help + man
-3, --level3use PostScript level 3 compression, if available.help + man
-q, --longcodingturn off optimized numerical coding in PostScript output.help + man
-G, --gamma nset the gamma value for anti-aliasing (default is 2.2).help + man
-k, --blacklevel nset the threshold level for converting input images to bitmaps.help + man
-i, --invertinvert the input bitmap before processing.help + man
--progressdisplay a progress bar for each bitmap that is processed.help + man
--tty modeset the terminal mode for progress bar rendering.help + man
Exit status (3) from the manual page
0successful completion
1the command line was invalid
2any other error

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.