1AutoTrace is a utility for converting bitmap into vector graphics.
2
3Features
4========
5- tracing outline and midline
6- color reduction and despeckling
7- supports a lot of input and output format
8
9Licenses
10========
11The program can be used under the GNU General Public License.
12
13The input and output functions (input-*.[ch] and output-*.[ch])
14can also be used under the GNU Lesser General Public License(LGPL).
15
16Some of code was partially derived from limn of GNU fontutils.
17However, almost all code is rewritten.
18
19Platforms
20=========
21The program was tested using GNU/Linux, HP UX, Solaris, Windows98,
22Windows NT, Windows 2000, MAC and OS/2 4.0. It compiles with GCC,
23Borland C++ Builder, Visual C++ and many other compilers.
24
25If you use Visual C++ 6.0 for compilation be sure to have at
26least SP 5 otherwise you could get Memory access violations due to
27a bug in earlier versions.
28
29Requirements
30============
31AutoTrace can be compiled standalone, then it can import pnm, pbm,
32pgm, ppm, bmp and tga files. If you have installed libpng
33(http://www.libpng.org/pub/png/libpng.html) you can also read png
34files and with ImageMagick a very broad range of input formats is
35available.
36
37You will need at least libpng 1.0.6 and ImageMagick 5.2.1.  Most
38output formats like dxf, emf, eps, ai, er, fig, svg, epd, dr2d and sk
39are directly integrated in AutoTrace, but if you need swf export you
40need to install Ming (http://www.opaque.net/ming/). Also you can
41export to the p2e format. This format can be converted by pstoedit
42(www.pstoedit.net) to a large number of other formats. If you have
43installed the latest pstoedit(3.32 or newer), autotrace uses pstoedit
44directly. However, direct pstoedit support is not stable enough.
45See INSTALL file for more detail.
46
47Installation
48============
49See the file INSTALL.
50
51Usage
52=====
53Program comes from two parts: command and library.
54
55Here the options you can use in the command:
56    Usage: autotrace.exe [options] <input_name>.
57    Options:<input_name> should be a supported image.
58      You can use `--' or `-' to start an option.
59      You can use any unambiguous abbreviation for an option name.
60      You can separate option names and values with `=' or ` '.
61    background-color <hexadecimal>: the color of the background that
62      should be ignored, for example FFFFFF;
63      default is no background color.
64    centerline: trace a character's centerline, rather than its outline.
65    color-count <unsigned>: number of colors a color bitmap is reduced to,
66      it does not work on gray scale, allowed are 1..256;
67      default is 0, that means not color reduction is done.
68    corner-always-threshold <angle-in-degrees>: if the angle at a pixel is
69      less than this, it is considered a corner, even if it is within
70      `corner-surround' pixels of another corner; default is 60.
71    corner-surround <unsigned>: number of pixels on either side of a
72      point to consider when determining if that point is a corner;
73      default is 4.
74    corner-threshold <angle-in-degrees>: if a pixel, its predecessor(s),
75      and its successor(s) meet at an angle smaller than this, it's a
76      corner; default is 100.
77    despeckle-level <unsigned>: 0..20; default is no despeckling.
78    despeckle-tightness <real>: 0.0..8.0; default is 2.0.
79    dpi <unsigned>: The dots per inch value in the input image, affects scaling
80      of mif output image
81    error-threshold <real>: subdivide fitted curves that are off by
82      more pixels than this; default is 2.0.
83    filter-iterations <unsigned>: smooth the curve this many times
84      before fitting; default is 4.
85    input-format:  TGA, PBM, PNM, PGM, PPM or BMP.
86    help: print this message.
87    line-reversion-threshold <real>: if a spline is closer to a straight
88      line than this, weighted by the square of the curve length, keep it a
89      straight line even if it is a list with curves; default is .01.
90    line-threshold <real>: if the spline is not more than this far away
91      from the straight line defined by its endpoints,
92      then output a straight line; default is 1.
93    list-output-formats: print a list of support output formats to stderr.
94    list-input-formats:  print a list of support input formats to stderr.
95    log: write detailed progress reports to <input_name>.log.
96    output-file <filename>: write to <filename>
97    output-format <format>: use format <format> for the output file
98    output-format <format>: use format <format> for the output file
99      eps, ai, p2e, sk, svg, fig, swf, emf, mif, er, dxf, epd, pdf, cgm or dr2d
100      can be used.
101    preserve-width: whether to preserve line width prior to thinning.\n\
102    remove-adjacent-corners: remove corners that are adjacent.
103    tangent-surround <unsigned>: number of points on either side of a
104      point to consider when computing the tangent at that point; default is 3.
105    report-progress: report tracing status in real time.
106    debug-arch: print the type of cpu.
107    debug-bitmap: dump loaded bitmap to <input_name>.bitmap.
108    version: print the version number of this program.
109    width-weight-factor: weight factor for fitting the line width.
110
111The library is named libautotrace. About the usage of the library
112see autotrace.h.
113Here is a sample program that uses libautotrace.
114To compile, invoke following commands (on posix):
115gcc sample.c `./autotrace-config --libs` `./autotrace-config --cflags`
116
117    /* sample.c */
118    #include <autotrace/autotrace.h>
119
120    int main()
121    {
122      char * fname = "img/triangle.png";
123      at_fitting_opts_type * opts = at_fitting_opts_new();
124      at_input_read_func rfunc = at_input_get_handler(fname);
125      at_bitmap_type * bitmap ;
126      at_splines_type * splines;
127      at_output_write_func wfunc = at_output_get_handler_by_suffix("eps");
128
129      bitmap = at_bitmap_read(rfunc, fname, NULL, NULL, NULL);
130      splines = at_splines_new(bitmap, opts, NULL, NULL);
131      at_splines_write(wfunc, stdout, "", NULL splines, NULL, NULL);
132      return 0;
133    }
134
135GUI Frontend
136============
137Frontline, a Gtk+/Gnome based GUI frontend, is under development.
138See http://autotrace.sourceforge.net/frontline
139
140autotrace mailing list is used to discuss frontline.  See next.
141
142More Information
143================
144See http://autotrace.sourceforge.net
145
146There is a mailing list to discussion autotrace.
147See also http://groups.yahoo.com/group/autotrace/
148
149Contribution
150============
151Programmers wanted!!!
152
153See TODO and HACKING file and contact the author.
154
155Author
156======
157Martin Weber (martweb@gmx.net)
158