Skip to content
bitmap to vector graphics converter
C Shell Other
Latest commit b3ac881 Sep 19, 2005 Robin Adams committed with autotrace 2005-09-19 Robin Adams <radams@linux-laser.org>
	* output-ild.[ch]: New files.
Failed to load latest commit information.
po * tools-version.sh (TOOLS): Added glib-gettextize. Jul 23, 2013
.cvsignore 2004-10-22 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
AUTHORS Initial revision Jul 23, 2013
COPYING Initial revision Jul 23, 2013
COPYING.LIB New file Jul 23, 2013
ChangeLog 2005-09-19 Robin Adams <radams@linux-laser.org> Jul 23, 2013
FAQ Updated. Jul 23, 2013
HACKING 2003-06-15 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
INSTALL updated. Jul 23, 2013
Makefile.am 2005-09-19 Robin Adams <radams@linux-laser.org> Jul 23, 2013
NEWS 2003-02-08 Martin Weber <martweb@gmx.net> Jul 23, 2013
README 2004-02-26 Henning Makholm <henning@makholm.net> Jul 23, 2013
README.MING 2001-12-01 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
THANKS 2005-09-19 Robin Adams <radams@linux-laser.org> Jul 23, 2013
TODO 2003-02-09 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
atou.c * main.c (exception_handler): added const to msg. Jul 23, 2013
atou.h * main.c (exception_handler): added const to msg. Jul 23, 2013
autogen.sh * Makefile.am(SUBDIRS): m4 is removed. (ACLOCAL_AMFLAGS): removed. Jul 23, 2013
autotrace-config.af * autotrace.pc.in (Libs): Added @GLIB2_LIBS@. Jul 23, 2013
autotrace.1 2002-10-10 Martin Weber <martweb@gmx.net> Jul 23, 2013
autotrace.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
autotrace.dsp 2003-01-20 Martin Weber <martweb@gmx.net> Jul 23, 2013
autotrace.dsw Remove dxf supports. Jul 23, 2013
autotrace.h (enum _at_msg_type): Applied a patch #843475 at sourceforge's patch t… Jul 23, 2013
autotrace.m4 ($LIBS): changed the order of appending $LIBS to $AUTOTRACE_LIBS. Jul 23, 2013
autotrace.pc.in * autotrace.pc.in (Libs): Added @GLIB2_LIBS@. Jul 23, 2013
autotrace.sln Added VC++ files. Jul 23, 2013
autotrace.spec.in (AUTOTRACE_VERSION): AC_SUBST for autotrace.spec.in. $VERSION is dele… Jul 23, 2013
autotrace.vcproj 2003-01-20 Martin Weber <martweb@gmx.net> Jul 23, 2013
bitmap.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
bitmap.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
cmdline.h 2001-12-24 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
color.c Rename at_color_type to at_color. Jul 23, 2013
color.h Rename at_color_type to at_color. Jul 23, 2013
configure.in 2004-05-01 Henning Makholm <henning@makholm.net> Jul 23, 2013
curve.c * curve.c (log_curve): Use %lx. Jul 23, 2013
curve.h * main.c (exception_handler): added const to msg. Jul 23, 2013
despeckle.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
despeckle.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
despeckle.txt 2003-01-24 Martin Weber <martweb@gmx.net> Jul 23, 2013
distro * distro, tools-version.sh: New files. distro comes from distro-0.8.1(h… Jul 23, 2013
epsilon-equal.c * curve.c (log_curve): Use %lx. Jul 23, 2013
epsilon-equal.h * main.c (exception_handler): added const to msg. Jul 23, 2013
exception.c * curve.c (log_curve): Use %lx. Jul 23, 2013
exception.h * curve.c (log_curve): Use %lx. Jul 23, 2013
filename.c * main.c (exception_handler): added const to msg. Jul 23, 2013
filename.h * main.c (exception_handler): added const to msg. Jul 23, 2013
fit.c distance_map_type -> at_distance_map_type. Jul 23, 2013
fit.h distance_map_type -> at_distance_map_type. Jul 23, 2013
getopt.c * *.c: include config.h. Jul 23, 2013
getopt.h 2001-12-23 Martin Weber <martweb@gmx.net> Jul 23, 2013
getopt1.c * *.c: include config.h. Jul 23, 2013
image-header.h 2001-12-24 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
image-proc.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
image-proc.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-bmp.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-bmp.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-gf.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-gf.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-magick.c * output-pstoedit.c: Rewrite. Jul 23, 2013
input-magick.h * output-pstoedit.c: Rewrite. Jul 23, 2013
input-png.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-png.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-pnm.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-pnm.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-tga.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input-tga.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
input.c * main.c (exception_handler): added const to msg. Jul 23, 2013
input.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
intl.h 2003-01-10 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
libming.dsp Added libming.*. Jul 23, 2013
libming.dsw Added libming.*. Jul 23, 2013
libming.sln 2001-12-23 Martin Weber <martweb@gmx.net> Jul 23, 2013
libming.vcproj 2001-12-23 Martin Weber <martweb@gmx.net> Jul 23, 2013
logreport.c * *.c: include config.h. Jul 23, 2013
logreport.h (at_log_file): Renamed from log_file. I guess the symbol `log_file' c… Jul 23, 2013
main.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
median.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
message.h 2001-12-24 Masatake YAMATO <yamato@redhat.com> Jul 23, 2013
module.c 2005-09-19 Robin Adams <radams@linux-laser.org> Jul 23, 2013
output-cgm.c * main.c (exception_handler): added const to msg. Jul 23, 2013
output-cgm.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-dr2d.c Rename at_color_type to at_color. Jul 23, 2013
output-dr2d.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-dxf.c Rename at_color_type to at_color. Jul 23, 2013
output-dxf.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-emf.c 2004-10-14 S. P. Hirshman Jul 23, 2013
output-emf.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-epd.c * private.h (at_time_string): New decl. Jul 23, 2013
output-epd.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-eps.c * private.h (at_time_string): New decl. Jul 23, 2013
output-eps.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-er.c * private.h (at_time_string): New decl. Jul 23, 2013
output-er.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-fig.c Rename at_color_type to at_color. Jul 23, 2013
output-fig.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-ild.c 2005-09-19 Robin Adams <radams@linux-laser.org> Jul 23, 2013
output-ild.h 2005-09-19 Robin Adams <radams@linux-laser.org> Jul 23, 2013
output-mif.c Rename at_color_type to at_color. Jul 23, 2013
output-mif.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-p2e.c Rename at_color_type to at_color. Jul 23, 2013
output-p2e.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-pdf.c Rename at_color_type to at_color. Jul 23, 2013
output-pdf.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-plt.c 2004-10-22 Steven P. Hirshman Jul 23, 2013
output-plt.h 2004-10-22 Steven P. Hirshman Jul 23, 2013
output-pov.c Rename at_color_type to at_color. Jul 23, 2013
output-pov.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-pstoedit.c * curve.c (log_curve): Use %lx. Jul 23, 2013
output-pstoedit.h * output-pstoedit.c: Rewrite. Jul 23, 2013
output-sk.c * main.c (exception_handler): added const to msg. Jul 23, 2013
output-sk.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-svg.c Rename at_color_type to at_color. Jul 23, 2013
output-svg.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output-swf.c * output-pstoedit.c: Rewrite. Jul 23, 2013
output-swf.h * output-pstoedit.c: Rewrite. Jul 23, 2013
output-ugs.c * curve.c (log_curve): Use %lx. Jul 23, 2013
output-ugs.h * main.c (exception_handler): added const to msg. Jul 23, 2013
output.c * main.c (exception_handler): added const to msg. Jul 23, 2013
output.h * main.c (exception_handler): added const to msg. Jul 23, 2013
patchestoming02a.txt 2003-01-24 Martin Weber <martweb@gmx.net> Jul 23, 2013
private.h * private.h (at_time_string): New decl. Jul 23, 2013
pxl-outline.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
pxl-outline.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
quantize.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
shape_cubic.c.diff 2001-12-01 Martin Weber <martweb@gmx.net> Jul 23, 2013
spline.c * main.c (exception_handler): added const to msg. Jul 23, 2013
spline.h * main.c (exception_handler): added const to msg. Jul 23, 2013
strgicmp.c * main.c (exception_handler): added const to msg. Jul 23, 2013
strgicmp.h * main.c (exception_handler): added const to msg. Jul 23, 2013
thin-image.c * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
thin-image.h * autotrace.c (at_time_string): check the value of `debug'. Jul 23, 2013
tools-version.sh * tools-version.sh (TOOLS): Added glib-gettextize. Jul 23, 2013
types.h (_at_coord): Use gushort. use AT_TYPES_H instead of TYPES_H. Jul 23, 2013
vector.c * main.c (exception_handler): added const to msg. Jul 23, 2013
vector.h * main.c (exception_handler): added const to msg. Jul 23, 2013
xstd.c * main.c (exception_handler): added const to msg. Jul 23, 2013
xstd.h * main.c (exception_handler): added const to msg. Jul 23, 2013

README

AutoTrace is a utility for converting bitmap into vector graphics.

Features
========
- tracing outline and midline
- color reduction and despeckling
- supports a lot of input and output format

Licenses
========
The program can be used under the GNU General Public License.

The input and output functions (input-*.[ch] and output-*.[ch])
can also be used under the GNU Lesser General Public License(LGPL).

Some of code was partially derived from limn of GNU fontutils.
However, almost all code is rewritten.

Platforms
=========
The program was tested using GNU/Linux, HP UX, Solaris, Windows98,
Windows NT, Windows 2000, MAC and OS/2 4.0. It compiles with GCC,
Borland C++ Builder, Visual C++ and many other compilers.

If you use Visual C++ 6.0 for compilation be sure to have at
least SP 5 otherwise you could get Memory access violations due to
a bug in earlier versions.

Requirements
============
AutoTrace can be compiled standalone, then it can import pnm, pbm,
pgm, ppm, bmp and tga files. If you have installed libpng
(http://www.libpng.org/pub/png/libpng.html) you can also read png
files and with ImageMagick a very broad range of input formats is
available.

You will need at least libpng 1.0.6 and ImageMagick 5.2.1.  Most
output formats like dxf, emf, eps, ai, er, fig, svg, epd, dr2d and sk
are directly integrated in AutoTrace, but if you need swf export you
need to install Ming (http://www.opaque.net/ming/). Also you can
export to the p2e format. This format can be converted by pstoedit
(www.pstoedit.net) to a large number of other formats. If you have
installed the latest pstoedit(3.32 or newer), autotrace uses pstoedit
directly. However, direct pstoedit support is not stable enough. 
See INSTALL file for more detail.

Installation
============
See the file INSTALL.

Usage
=====
Program comes from two parts: command and library.

Here the options you can use in the command:
    Usage: autotrace.exe [options] <input_name>.
    Options:<input_name> should be a supported image.
      You can use `--' or `-' to start an option.
      You can use any unambiguous abbreviation for an option name.
      You can separate option names and values with `=' or ` '.
    background-color <hexadecimal>: the color of the background that
      should be ignored, for example FFFFFF;
      default is no background color.
    centerline: trace a character's centerline, rather than its outline.
    color-count <unsigned>: number of colors a color bitmap is reduced to,
      it does not work on gray scale, allowed are 1..256;
      default is 0, that means not color reduction is done.
    corner-always-threshold <angle-in-degrees>: if the angle at a pixel is
      less than this, it is considered a corner, even if it is within
      `corner-surround' pixels of another corner; default is 60.
    corner-surround <unsigned>: number of pixels on either side of a
      point to consider when determining if that point is a corner;
      default is 4.
    corner-threshold <angle-in-degrees>: if a pixel, its predecessor(s),
      and its successor(s) meet at an angle smaller than this, it's a
      corner; default is 100.
    despeckle-level <unsigned>: 0..20; default is no despeckling.
    despeckle-tightness <real>: 0.0..8.0; default is 2.0.
    dpi <unsigned>: The dots per inch value in the input image, affects scaling
      of mif output image
    error-threshold <real>: subdivide fitted curves that are off by
      more pixels than this; default is 2.0.
    filter-iterations <unsigned>: smooth the curve this many times
      before fitting; default is 4.
    input-format:  TGA, PBM, PNM, PGM, PPM or BMP.
    help: print this message.
    line-reversion-threshold <real>: if a spline is closer to a straight
      line than this, weighted by the square of the curve length, keep it a
      straight line even if it is a list with curves; default is .01.
    line-threshold <real>: if the spline is not more than this far away
      from the straight line defined by its endpoints,
      then output a straight line; default is 1.
    list-output-formats: print a list of support output formats to stderr.
    list-input-formats:  print a list of support input formats to stderr.
    log: write detailed progress reports to <input_name>.log.
    output-file <filename>: write to <filename>
    output-format <format>: use format <format> for the output file
    output-format <format>: use format <format> for the output file
      eps, ai, p2e, sk, svg, fig, swf, emf, mif, er, dxf, epd, pdf, cgm or dr2d
      can be used.
    preserve-width: whether to preserve line width prior to thinning.\n\
    remove-adjacent-corners: remove corners that are adjacent.
    tangent-surround <unsigned>: number of points on either side of a
      point to consider when computing the tangent at that point; default is 3.
    report-progress: report tracing status in real time.
    debug-arch: print the type of cpu.
    debug-bitmap: dump loaded bitmap to <input_name>.bitmap.
    version: print the version number of this program.
    width-weight-factor: weight factor for fitting the line width.

The library is named libautotrace. About the usage of the library
see autotrace.h.
Here is a sample program that uses libautotrace.
To compile, invoke following commands (on posix):
gcc sample.c `./autotrace-config --libs` `./autotrace-config --cflags`

    /* sample.c */
    #include <autotrace/autotrace.h>

    int main()
    {
      char * fname = "img/triangle.png";
      at_fitting_opts_type * opts = at_fitting_opts_new();
      at_input_read_func rfunc = at_input_get_handler(fname);
      at_bitmap_type * bitmap ;
      at_splines_type * splines;
      at_output_write_func wfunc = at_output_get_handler_by_suffix("eps");

      bitmap = at_bitmap_read(rfunc, fname, NULL, NULL, NULL);
      splines = at_splines_new(bitmap, opts, NULL, NULL);
      at_splines_write(wfunc, stdout, "", NULL, splines, NULL, NULL);
      return 0;
    }

GUI Frontend
============
Frontline, a Gtk+/Gnome based GUI frontend, is under development.
See http://autotrace.sourceforge.net/frontline

autotrace mailing list is used to discuss frontline.  See next.

More Information
================
See http://autotrace.sourceforge.net

There is a mailing list to discussion autotrace.
See also http://groups.yahoo.com/group/autotrace/

Contribution
============
Programmers wanted!!!

See TODO and HACKING file and contact the author.

Author
======
Martin Weber (martweb@gmx.net)
Something went wrong with that request. Please try again.