bitmap to vector graphics converter
AutoTrace is a program for converting bitmap images to vector graphics.
macOS:
brew install autotrace
# or
port install autotraceLinux:
# Fedora/RHEL
sudo dnf install autotrace
# Arch Linux
sudo pacman -S autotrace
# Debian/Ubuntu - build from source (see below)FreeBSD:
pkg install autotraceDownload the installer from the Releases page.
Available installers:
autotrace-VERSION-win32-setup.exe (32-bit)autotrace-VERSION-win64-setup.exe (64-bit)See INSTALL for detailed instructions.
Requirements:
Quick start:
# System-wide installation (requires root)
./autogen.sh
./configure
make
sudo make install
# User-local installation (no root needed)
./autogen.sh
./configure --prefix=$HOME/.local
make
make installConvert a bitmap to SVG:
autotrace input.png -output-file output.svgTrace centerlines:
autotrace input.png -centerline -output-file output.svgReduce colors before tracing:
autotrace input.png -color-count 4 -output-file output.svgFor complete options, see autotrace --help or man autotrace.
AutoTrace can be used as a library (libautotrace). Here's a minimal example:
#include
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;
}Compile with:
gcc sample.c $(pkg-config --cflags --libs autotrace)See autotrace.h for full API documentation.
Input formats: PNG, BMP, TGA, PNM (PBM/PGM/PPM), GF
Output formats: SVG, EPS, PDF, AI, DXF, CGM, EMF, MIF, ER, Fig, and many others
List all formats: autotrace --list-input-formats or autotrace --list-output-formats
AutoTrace uses GNU gettext for internationalization. Help translate AutoTrace into your language! For translators: Visit our Weblate project to start translating. See TRANSLATING.md for detailed guidelines.
For developers: When adding translatable strings, wrap them with _() and run ./po/update-pot.sh to update the translation template. See TRANSLATING.md for details.
Contributions welcome! See our issue tracker and TODO file.
Areas where help is needed:
libautotrace): LGPL v2.1 or laterAutoTrace was originally developed by Martin Weber. Some code was derived from the limn program in GNU fontutils, though most has been completely rewritten.
Martin Weber ([email protected])
No open issues yet, or sync has not completed.