百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

autotrace

> 编程语言
开源

位图到向量图形转换器

714 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

位图到向量图形转换器

AutoTrace

AutoTrace is a program for converting bitmap images to vector graphics.

Features

  • Outline and centerline tracing - trace the edges or centerlines of shapes
  • Color reduction - reduce colors for cleaner output
  • Despeckling - remove noise from images
  • Multiple formats - supports numerous input formats (PNG, BMP, PNM, TGA, etc.) and output formats (SVG, EPS, PDF, DXF, etc.)

Installation

Package Managers

macOS:

bash
brew install autotrace
# or
port install autotrace

Linux:

bash
# Fedora/RHEL
sudo dnf install autotrace

# Arch Linux
sudo pacman -S autotrace

# Debian/Ubuntu - build from source (see below)

FreeBSD:

bash
pkg install autotrace

Windows

Download the installer from the Releases page.

Available installers:

  • autotrace-VERSION-win32-setup.exe (32-bit)
  • autotrace-VERSION-win64-setup.exe (64-bit)

Building from Source

See INSTALL for detailed instructions.

Requirements:

  • C compiler (GCC, Clang, MSVC)
  • libpng (optional, for PNG support)
  • ImageMagick or GraphicsMagick (optional, for additional formats)
  • GLib 2.x

Quick start:

bash
# 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 install

Usage

Command Line

Convert a bitmap to SVG:

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

Trace centerlines:

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

Reduce colors before tracing:

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

For complete options, see autotrace --help or man autotrace.

Library

AutoTrace can be used as a library (libautotrace). Here's a minimal example:

c
#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:

bash
gcc sample.c $(pkg-config --cflags --libs autotrace)

See autotrace.h for full API documentation.

Supported Formats

Input formats: PNG, BMP, TGA, PNM (PBM/PGM/PPM), GF

  • With ImageMagick/GraphicsMagick: JPEG, TIFF, GIF, and many more

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

Translation

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.

Contributing

Contributions welcome! See our issue tracker and TODO file.

Areas where help is needed:

  • Bug fixes and improvements
  • Documentation
  • Additional format support
  • Plugin development for image editors
  • Your ideas and suggestions!

License

  • Program: GPL v2 or later
  • Library (libautotrace): LGPL v2.1 or later
  • Input/output modules can be used under either license

History

AutoTrace was originally developed by Martin Weber. Some code was derived from the limn program in GNU fontutils, though most has been completely rewritten.

Links

  • Homepage: https://github.com/autotrace/autotrace
  • Issues: https://github.com/autotrace/autotrace/issues
  • GUI Frontend (inactive): https://github.com/autotrace/frontline

Author

Martin Weber ([email protected])

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Chacktoberfestsvgvectorization

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言