CLI tool
autotrace/autotrace avatar
autotrace/autotrace

autotrace turns a bitmap into splines without a GUI

bitmap to vector graphics converter

748 stars96 forksCGPL-2.0

At a glance

What is it?
autotrace is a command line program that traces a bitmap image into vector outlines or centerlines, and it is one of the few tools in the graphics stack that still ships as a C library you can link against, with a dual licence arrangement that makes the library usable under LGPL terms.
Who is it for?
autotrace suits a build pipeline that needs a logo rasterised into vector curves, or a developer who wants to embed tracing in a larger tool, since libautotrace is a documented C API rather than a wrapper around a binary.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Four features, and only one of them is about looks

AutoTrace is a program for converting bitmap images to vector graphics, and the feature list is four items. Outline and centerline tracing means you can trace either the edges of shapes or their centerlines, and the centerline mode is the one that matters if you are re-drawing a technical diagram rather than a logo. Color reduction reduces colors for cleaner output, which is a preprocessing step on the bitmap rather than something about the vectors. Despeckling removes noise from images, again on the input side. And multiple formats means it reads numerous input formats such as PNG, BMP, PNM and TGA, and writes SVG, EPS, PDF, DXF and others. The audience is a pipeline author rather than an illustrator, and the project is hosted at github.com/autotrace/autotrace under the GPL-2.0 with a separate LGPL option for the library.

Packaging is mostly distributions, and Debian means compiling

The installation section is mostly package managers, and the one gap is informative. On macOS you can use Homebrew with brew install autotrace or MacPorts with port install autotrace. On Linux, Fedora and RHEL get sudo dnf install autotrace and Arch gets sudo pacman -S autotrace, while Debian and Ubuntu are marked as build from source. On FreeBSD it is pkg install autotrace. On Windows you download an installer from the releases page, with separate 32-bit and 64-bit setup executables named autotrace-VERSION-win32-setup.exe and autotrace-VERSION-win64-setup.exe. The Debian situation is the usual story for a program with a small set of native dependencies, since the libpng and ImageMagick and GLib combination is a combination that is awkward to package, and the readme points at an INSTALL file for details.

Building is autotools, and it can live in your home directory

The requirements are a C compiler, either GCC, Clang or MSVC, libpng for PNG support as an optional dependency, ImageMagick or GraphicsMagick for additional formats as an optional dependency, and GLib 2.58 or newer. The build is the familiar autotools sequence, and the readme gives two variants, a system-wide installation that requires root.

bash
# System-wide installation (requires root)
./autogen.sh
./configure
make
sudo make install

And a user-local one that does not.

bash
# User-local installation (no root needed)
./autogen.sh
./configure --prefix=$HOME/.local
make
make install

The prefix difference is the whole point of the second form, since a tool that ends up in a personal bin directory does not need a package manager and does not need root, which is convenient in a container build or on a shared machine. The CI badges show the project tested on Linux, macOS, FreeBSD and Windows, and there is a Coverity badge and a REUSE status badge for the licensing metadata, both of which signal a project with a compliance focus rather than only a coding one.

The command line is small and the options are documented twice over

The usage section gives the three common invocations. Converting a bitmap to SVG is autotrace with an input file and an output file option.

bash
autotrace input.png -output-file output.svg

Tracing centerlines rather than outlines adds a flag.

bash
autotrace input.png -centerline -output-file output.svg

And reducing the colours before tracing is another.

bash
autotrace input.png -color-count 4 -output-file output.svg

For the complete set of options you are pointed to autotrace --help or the man page, and the man page is shipped as autotrace.1 in the repository. There is also a pair of listing options, --list-input-formats and --list-output-formats, which is a small courtesy that saves a lot of guessing.

libautotrace is a real API, not a shell wrapper

The part of this project that other projects depend on is the library, and the README shows a minimal C program using it. The flow is a fitting options object, an input handler looked up by name, a bitmap read, a splines object built from the bitmap and the options, an output handler looked up by suffix, and then the splines written out and everything freed in the right order.

c
#include <autotrace/autotrace.h>

int main()
{
  at_fitting_opts_type * opts = at_fitting_opts_new();
  at_input_read_func rfunc = at_input_get_handler("image.png");
  at_bitmap_type * bitmap = at_bitmap_read(rfunc, "image.png", NULL, NULL, NULL);
  at_splines_type * splines = at_splines_new(bitmap, opts, NULL, NULL);
  at_output_write_func wfunc = at_output_get_handler_by_suffix("eps");

  at_splines_write(wfunc, stdout, "", NULL, splines, NULL, NULL);
  at_splines_free(splines);
  at_bitmap_free(bitmap);
  at_fitting_opts_free(opts);

  return 0;
}

The handlers are looked up by name and by suffix, so adding a format is a matter of registering a handler rather than changing the core, and the full API documentation is in autotrace.h. The compile line uses pkg-config, and the project ships an autotrace.pc.in template for it, which is the piece that makes the library installable in a way a build system can find.

A dual licence and a release process written down

The licensing arrangement is unusual enough to be worth stating precisely. The program is under GPL v2 or later, the library libautotrace is under LGPL v2.1 or later, and the input and output modules can be used under either licence, with the LICENSES/ directory in the repository holding the texts. The practical effect is that a commercial application can link the library without the copyleft of the program applying to it, which is why the split exists. The release procedure is documented step by step for maintainers. You update NEWS, you bump the version in AC_INIT in configure.ac, and you update LT_CURRENT, LT_REVISION and LT_AGE following the libtool versioning rules, where any code change bumps REVISION, an added, removed or changed interface bumps CURRENT and resets REVISION, added interfaces also bump AGE, and removed ones reset AGE to 0. Then you tag the commit and push the tag, the Windows workflow builds the installers for every tag, and you attach them and the make dist tarball to the GitHub release. A project that spells out its own release mechanics has usually had a maintainer leave at some point, which is the other thing the version history suggests.

Editorial conclusion

autotrace suits a build pipeline that needs a logo rasterised into vector curves, or a developer who wants to embed tracing in a larger tool, since libautotrace is a documented C API rather than a wrapper around a binary. It is the wrong tool if you want an interactive drawing session, because the project explicitly marks its GUI frontend as inactive, and it is the wrong tool for tracing a photograph into something that looks hand drawn, because the feature set is about outlines and centerlines rather than stylised strokes. Before using it, check which input formats you need, since JPEG, TIFF and GIF arrive through ImageMagick or GraphicsMagick and the base build covers only PNG, BMP, TGA, PNM and GF. The last push was on 2026-10-19 and the newest tagged release is 0.31.10 from 2024-01-29.

Frequently asked questions

How do I install autotrace on Linux?

Fedora and RHEL use sudo dnf install autotrace and Arch uses sudo pacman -S autotrace, while Debian and Ubuntu are marked as build from source. The source build is the autotools sequence of autogen.sh, configure, make and make install, with a --prefix option for a user-local install that needs no root.

Which formats can autotrace read and write?

The base input formats are PNG, BMP, TGA, PNM which covers PBM, PGM and PPM, and GF. With ImageMagick or GraphicsMagick installed it also handles JPEG, TIFF, GIF and many more. The output formats include SVG, EPS, PDF, AI, DXF, CGM, EMF, MIF and ER, and you can list them all with autotrace --list-input-formats and autotrace --list-output-formats.

Can I use autotrace as a library?

Yes, as libautotrace. The README gives a minimal C program that creates fitting options, looks up an input handler by name, reads a bitmap, builds splines and writes them through an output handler looked up by suffix, and you compile it with gcc sample.c and the pkg-config flags for autotrace. The full API is documented in autotrace.h.

Official sources

  1. autotrace/autotrace on GitHub
  2. Issues
  3. License: GPL-2.0
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/autotrace-autotrace.svg)](https://hysenlabs.com/projects/autotrace-autotrace)

Was this useful?