Hi all,
I have started using autotrace and exploring on it. I needed some
basic help in it. I want to know the outline algorithm used in the
autotrace, which will help me to understand the code in better way. I
want to what is the outline algorithm used in Autotrace
Greetings,
I hope someone can help me.
I was told about the AutoTrace program by the creator of Jigs@w
Puzzles 2 at Tibosoftware.com. They used AutoTrace to create an emf
file that broke a picture of a porsche into pieces very different
from a normal jigsaw puzzle. The pieces looked more like pieces from
a plastic car model I used to glue together as a kid. Please take a
look at the sample puzzle at http://www.tibosoftware.com/jigsaw-
puzzle-free.htm Download the samples and play the puzzle mentioned
below.
The particular puzzle to open is the one called "surprise puzzle".
Anyway, I would like to know how to create such a puzzle. I don't
know how to upload the porsche.jpg file, but anyone that can help,
please email me and I will send you the file immediately. One option
in JP2, is to create puzzles using vector templates in emf format.
However, the main problem I am having is I cannot get AutoTrace to
even run. Martin sent me a zip file. There was no install program
with it. I double clicked on AutoTrace.exe and I get a small black
screen that then disappears. I am running Win 98SE.
I tried Open Office Draw. When I creat a emf file, I get too many
little pieces. I edited the file to eliminate the microscopic pieces
in Paint Shop Pro and saved as a bmp, and then opened the file in
Open Office Draw and converted to vector and saved as an emf. JP2
did not recognize the emf file when I did this. Interestingly
enough, JP2 did use the emf file when I didn't go through the Paint
Shop Pro steps above with emf files saved in Open Office Draw. One
other thing, JP2, in the puzzle create mode, will try to limit the
number of microscopic pieces, but I could not produce a puzzle like
the sample I mentioned above.
A trial of JP2 can be downloaded and tried for free. In the create
puzzle mode, go to advanced mode to get to the screens where you can
use templates.
Therefore my request is:
1. Please help me to get AutoTracem up and running. What else do I
need to do? Does anyone have a step by step installation procedure
that may work?
2. A short tutorial on how to create puzzles like the Porsche puzzle,
that shows the settings required.
I appreciate any help that can be provided.
Regards,
George
nj3h@...
From: autotrace@yahoogroups.com [mailto:autotrace@yahoogroups.com] On Behalf Of plalbrecht Sent: Sunday, July 29, 2007 2:38 PM To: autotrace@yahoogroups.com Subject: [AutoTrace] Re: Need installation help
--- In autotrace@yahoogroups.com, <junkman@...> wrote: > > It's been a while, but I think the only way I got it to work via Delineate > was to run it under Linux ( or maybe Cygwin).
Thanks anyway.
This is hackerware. Useless for the vast majority of potential users. Whose idea was it to use a command line interface for what is fundamentally a graphical, visual process? Duh...
--- In autotrace@yahoogroups.com, <junkman@...> wrote:
>
> It's been a while, but I think the only way I got it to work via
Delineate
> was to run it under Linux ( or maybe Cygwin).
Thanks anyway.
This is hackerware. Useless for the vast majority of potential users.
Whose idea was it to use a command line interface for what is
fundamentally a graphical, visual process? Duh...
It's OUTTA here.
It's been a while, but I think the only way I got it to work via Delineate was to run it under Linux ( or maybe Cygwin).
It seemed that the Java just didn't want to work properly. {Shrug}
I also had a lot of trouble from the command line. Below is what I ended up with. This converts to SVG.
Put this in a .bat file and save it in the autotrace folder. (I know it works like that...)
Drag and drop your sourcefile (ie: image.bmp) to the batch file or a shortcut of the batch file.
The output file should land in the same folder as the source file.
REM ---------------Start--------------------------------
set file1=%~1
set options=-preserve-width -output-format svg -output-file "C:\AutoTrace\autotrace.exe" %options% "%file1%.svg" "%file1%"
REM ---------------End------------------------------------
I also had troubles with PoTrace. I think I got it working in Delineate, under Windows ONCE :-)
I believe Autotrace's Kung Fu is better...
From: autotrace@yahoogroups.com [mailto:autotrace@yahoogroups.com] On Behalf Of plalbrecht Sent: Saturday, July 21, 2007 12:00 PM To: autotrace@yahoogroups.com Subject: [AutoTrace] Need installation help
Can somebody help me get this stuff going? I have been wrestling with Autotrace, Potrace, and Delineate for the better part of a day, and have been unable to get anything to work.
The system is Windows 2000.
I have autotrace and potrace installed in their own folders under WINNT.
I have added these to the PATH variable: C:\WINNT\autotrace and C:\WINNT\potrace.
I have downloaded and installed j2sdk-1_4_2_15 and installed it in C:\Program Files\Java\j2sdk-1_4_2_15
I have added the environment variable C:\Program Files\Java\j2sdk-1_4_2_15
This stuff doesn't work. If I run delineate.bat, I get a black window named C:\WINNT\System32\cmd.exe and an error box "Cannot find the file 'C:\program' (or one of its components). Make sure the path and filename are correct and that all required libraries are available."
My understanding was that when first run, delineate it would offer autotrace or potrace as options. Neither of those seems to do anything when I try to start them manually from within their folders, either.
Can somebody help me get this stuff going? I have been wrestling with
Autotrace, Potrace, and Delineate for the better part of a day, and
have been unable to get anything to work.
The system is Windows 2000.
I have autotrace and potrace installed in their own folders under WINNT.
I have added these to the PATH variable: C:\WINNT\autotrace and
C:\WINNT\potrace.
I have downloaded and installed j2sdk-1_4_2_15 and installed it in
C:\Program Files\Java\j2sdk-1_4_2_15
I have added the environment variable
C:\Program Files\Java\j2sdk-1_4_2_15
This stuff doesn't work. If I run delineate.bat, I get a black window
named C:\WINNT\System32\cmd.exe
and an error box
"Cannot find the file 'C:\program' (or one of its components). Make
sure the path and filename are correct and that all required libraries
are available."
My understanding was that when first run, delineate it would offer
autotrace or potrace as options. Neither of those seems to do anything
when I try to start them manually from within their folders, either.
What's wrong here?
Thanks in advance,
Pete
Thanks Tom and Masatake, this makes a lot of sense. Just 3 thoughts before I try this;
1) I have assumed I should specify the file I want to convert (r.bmp) after the commands etc outlined in Masatake's response, but without parenthesis.
2) Can I use .txt as the output file extension, as DOS only allows 3 letters here? My plotter is happy reading text as hpgl.
3) All the images I work with are just black and white, so FFFFFF will always be my background colour. If this is the default background colour, I assume I don't need to specify it?
OK, just tried this, got another error message, so I'm not there yet:-
Problem during opening C:\totnp233.dll: Problem during opening of pstoedit driver plugin: C:\totnp233.dll. This is no problem as long the driver in this library is not
needed. Possibly you need to install further libraries and/or extend the LD_LIBRARY_PATH (*nix) or PATH (Windows) environment variables.
And the output file I specified is present but empty... have tried this twice, now.
I suspect that the error opening the above mentioned dll file has caused this? Or have I syntaxed myself into a corner again? Do I need a pstoedit driver plugin for what I'm trying?
> autotrace
[background-color=FFFFFF--input-format=BMP--output-file=C:\--output-format=hpgl]
<r.bmp>
`[', `]' and '<' and `>' are special characters.
Do like:
autotrace --background-color=FFFFFF --input-format=BMP
--output-file=C:\\foo.hpgl --output-format=hpgl
or
autotrace --background-color=FFFFFF --input-format=BMP --output-format=hpgl >
C:\\foo.hpgl
I'm not using DOS or Windows. So I'm afraid `C:\\foo.hpgl' is wrong. If you get
an error with
above command line, use C:\foo.hpgl instead.
Masatake YAMATO
Further to my previous E-mail (which could have been more specific...), I have tried a few of my own interpretations of the instructions in the help file, all of which have failed to produce anything other than 'bad command or filename' as a response. An example:-
This was my most promising guess...r.bmp is a simple 1 mb windows bitmap of black 1px horizontal lines on a white background, which will need no further editing prior to, during or after conversion to hpgl. It is located in the root dir of the C drive, as are all the autotrace files.
I previously used 'Raster to vector 7.0' which could scale a jpeg version of r.bmp up by 15 times and convert to hpgl. Does autotrace have a scaling function? I can't see anything listed in the help file.
THanks again, RB
Can anyone demonstrate the correct syntax for what I'm trying to
do?
I've got as far as opening the help file in autotrace, but I don't understand what's written there... Can anyone please indulge me and just E-mail me exactly what I should type in order to convert a bmp file ( in this case r.bmp, situated in the root directory of my C:\ drive) into an hpgl file of the same name, outputted to the same location, but scaled up by a factor of 'x'. Sorry to be a pain...
Also, this program (on my system, and that of a friend who tried it) seems to terminate when started under windows. I assume it can be run from DOS, but as the download contained a lot of .dll files, I am a little confused as to how DOS uses them. Anyone got a layman's answer to that one?
Much obliged, RB
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
It's a command-line program. as it says, use "-help"
run the exe with "-help" on the command line and it will tell you the options you can put on the command line to make it do what you want it to do to your image(s).
Firstly, thanks to Ian MacPhedran for helping sort my previous syntax problem. Now I have a new problem!
I downloaded and unzipped autotrace.0.31.1-w32, and moved it's contents to C:\.
On calling the .exe file from the windows ME dos prompt, I got this message:-
Usage:C:\ AUTOTR~!.EXE [Options} <image_name>. <missing<image_name>.> For more information use -"help"
I have no idea what this is trying to tell me. Can anyone enlighten me? Assuming someone does, what should I do next in order to get autotrace up and running? I find the readme files a bit impenetrable, as I lack the technical background, so any help would be appreciated.
Thanks,
RB
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the
Yahoo! Mail Championship.
Firstly, thanks to Ian MacPhedran for helping sort my previous syntax problem. Now I have a new problem!
I downloaded and unzipped autotrace.0.31.1-w32, and moved it's contents to C:\. On calling the .exe file from the windows ME dos prompt, I got this message:-
Usage:C:\ AUTOTR~!.EXE [Options} <image_name>. <missing<image_name>.> For more information use -"help"
I have no idea what this is trying to tell me. Can anyone enlighten me? Assuming someone does, what should I do next in order to get autotrace up and running? I find the readme files a bit impenetrable, as I lack the technical background, so any help would be appreciated.
Thanks,
RB
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
I'm new to a lot of this, and haven't used DOS for so long Ive forgotten most of it, so I may be out of my depth here...
I have a PC running Windows ME, and a Roland dxy1100 plotter that works fine in 'standalone' print test mode, but does nothing when plugged into the parallel port ( set to spp). There are so many options for what may be wrong that I don't know where to start. I have downloaded and installed a variety of drivers, both windows and Dos, and according to 'settings' the windows driver from the roland website is there. The dip switches are all in the correct positions for printing from lpt1.
Have I got the wrong driver? Is there a problem with the port on my PC? How do I tell? Anyone out there used one of these before??
I need someone to tell me exactly what I should type after the command prompt to get an HPGL (or is it .hgl?) file from my desktop to the plotter. I may be sounding like a total idiot here, but I'm lost on
this...
Is there anyone out there who could help me with this? All I need to do is print HPGL files from the plotter...That way I can get on with my work.
> Did you install ming?
yes, i have
ming-0.3.0-i686-1
(on slackware 11)
> SWFMovie_add may be part of ming.
> If you, which directory you installed it?
i compiled ming with --prefix=/usr
> I cannot remember but, maybe you can turn off ming support in
> autotrace explicitly with configure option.
./configure --prefix=/usr --without-ming
i get the same error with this confifgure,so i suppose i can't disable
ming support..
Did you install ming?
SWFMovie_add may be part of ming.
If you, which directory you installed it?
I cannot remember but, maybe you can turn off ming support in
autotrace explicitly with configure option.
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -I/usr/include -O2
> -march=pentium4 -mmmx -msse -msse2 -c output-swf.c -fPIC -DPIC -o
> .libs/output-swf.lo
> output-swf.c: In function `out_splines':
> output-swf.c:78: warning: passing arg 2 of `SWFMovie_add' from
> incompatible pointer type
> output-swf.c: In function `output_swf_writer':
> output-swf.c:112: error: `fileOutputMethod' undeclared (first use in
> this function)
> output-swf.c:112: error: (Each undeclared identifier is reported only once
> output-swf.c:112: error: for each function it appears in.)
> make[1]: *** [output-swf.lo] Error 1
> make[1]: Leaving directory `/download/autotrace-0.31.1'
> make: *** [all] Error 2
i got this error, could anybody help me?
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include -I/usr/include -O2
-march=pentium4 -mmmx -msse -msse2 -c output-swf.c -fPIC -DPIC -o
.libs/output-swf.lo
output-swf.c: In function `out_splines':
output-swf.c:78: warning: passing arg 2 of `SWFMovie_add' from
incompatible pointer type
output-swf.c: In function `output_swf_writer':
output-swf.c:112: error: `fileOutputMethod' undeclared (first use in
this function)
output-swf.c:112: error: (Each undeclared identifier is reported only once
output-swf.c:112: error: for each function it appears in.)
make[1]: *** [output-swf.lo] Error 1
make[1]: Leaving directory `/download/autotrace-0.31.1'
make: *** [all] Error 2
Hallo Martin,
anbei die Sources für die DXF-Ausgabe.
Die erzeugten Splines werden zu Liniensegmenten (nach B-Spline 4.ter
Ordnung)
konvertiert. Dies ergab die besten Ergebnisse im Vergleich zum Orginal.
Kubische Splines ergaben schlechtere Ergebnisse. Alle Segmente werden
als
Polyline ausgegeben. Dies ergibt zwar große Datenmengen, damit sollten
aber alle
DXF-Reader zurecht kommen. Der weitere Vorteil ist, dass dann auch
gerade Linien
mit den Rundungen verschmolzen werden können.
Folgendes Problem ist mir noch aufgefallen: Teilweise wechselt der RGB
Wert
innerhalb eines Linienzuges der eigentlich gleichfarbig sein sollte. Der
RGB
Wert ist dann immer 0,0,0. Ich habe das jetzt so programmiert das dann
kein
Lagenwechsel erzeugt wird. Siehe Kommentar /* sometimes RGB 0,0,0 is in
list.color, assume that this means no color change */ in out_splines().
Die RGB zu Lagen Konvertierung beinhaltet momentan nur 9 Lagen mit den
Grundfarben. In der Ausgabe sind aber schon all 255 Farben als Lage
definiert.
Man müsste da dann noch die Tabelle mit den RGB Werten erweitern.
Folgende Wünsche hätte ich noch:
1. Eine Linie die ein Pixel breit ist, sollte nicht umfahren werden,
sondern als
eine Linie in der Mitte zurückkommen. Gerade beim Umsetzen von
technischen
Zeichnungen ist das wichtig.
Ist da was zu machen?
2. Die Umfahrung der Bildgrenze (Rahmen außen rum) sollte bei DXF
weggelassen
werden, da der Rahmen mit Elementen der Zeichnung verschmilzt wenn diese
am Rand
abgeschnitten sind.
Hier wäre eine Option brauchbar!?
3. Die Bildabmaße sollten noch in den DXF-Header geschrieben werden
werden,
damit der Bildauschnitt im CAD-System gleich auf eingepasste Zeichnung
steht.
Ansonsten sieht der Anwender im CAD-System nur einen Teil der Zeichnung
oder
sogar gar nichts und muss erst auf einpassen klicken.
Ein GUI für das Programm mit Möglichkeit die Einstellungen abzuspeichern
wäre nicht schlecht.
Die langen Optionen einzutippen ist doch sehr lästig.
Folgender Bug ist mir noch aufgefallen: Ein Buchstabe O wird ja mit
Innen- und
Außenkontur gefahren. Die Innenkontur überschneidet sehr oft die
Außenkontur und
zwar um mehrere Einheiten.
Viele Grüße
Dietmar Kovar
The spline record is ok, but the rest of the DXF R14 file is wrong.
Writing R14 files is rather complex. You need to get the handles right,
add an OBJECT section, other tables in the table section and more. I
suggest you go for DXF R12, if possible.
But I added the needed sections by hand. The result is attached to this
mail, and it loads into AutoCAD. You'll notice that the ENTITIES section
is the same, so you got your SPLINE right.
Hope this helps
Daniel
What is faster - using the glib or stl?
--- In autotrace@yahoogroups.com, Masatake YAMATO <jet@...> wrote:
>
> > Can we do something similar in pure C without using that lib?
Some
> > simple example code?
>
> I can do nothing with pure C :-P
>
> Here is the code from glib/glib/garray.c:
> static void
> g_array_maybe_expand (GRealArray *array,
> gint len)
> {
> guint want_alloc = g_array_elt_len (array, array->len + len +
> array->zero_terminated);
>
> if (want_alloc > array->alloc)
> {
> want_alloc = g_nearest_pow (want_alloc);
> want_alloc = MAX (want_alloc, MIN_ARRAY_SIZE);
>
> array->data = g_realloc (array->data, want_alloc);
>
> #ifdef ENABLE_GC_FRIENDLY
> memset (array->data + array->alloc, 0, want_alloc - array-
>alloc);
> #endif /* ENABLE_GC_FRIENDLY */
>
> array->alloc = want_alloc;
> }
> }
>
> Can we do something similar in pure C without using that lib? Some
> simple example code?
I can do nothing with pure C :-P
Here is the code from glib/glib/garray.c:
static void
g_array_maybe_expand (GRealArray *array,
gint len)
{
guint want_alloc = g_array_elt_len (array, array->len + len +
array->zero_terminated);
if (want_alloc > array->alloc)
{
want_alloc = g_nearest_pow (want_alloc);
want_alloc = MAX (want_alloc, MIN_ARRAY_SIZE);
array->data = g_realloc (array->data, want_alloc);
#ifdef ENABLE_GC_FRIENDLY
memset (array->data + array->alloc, 0, want_alloc - array->alloc);
#endif /* ENABLE_GC_FRIENDLY */
array->alloc = want_alloc;
}
}
Can we do something similar in pure C without using that lib? Some
simple example code?
--- In autotrace@yahoogroups.com, Masatake YAMATO <jet@...> wrote:
>
> Hi,
>
> > I am looking for a better way creating dynamic arrays in C. I
have the
> > following problem. First I create an array with the size 1 then I
> > resized it to size 2 then to size 3 ... always by one as I do not
know
> > the final size. For size I use realloc, but doing it such way is
very
> > slow. Any better idea in C?
>
> If you allocated n byte with realloc last time and you need n+1 or
more,
> allocate 2*n with realloc.
>
> realloc already does so?
> STL does something more clever?
>
> Masatake
>
Hi,
> I am looking for a better way creating dynamic arrays in C. I have the
> following problem. First I create an array with the size 1 then I
> resized it to size 2 then to size 3 ... always by one as I do not know
> the final size. For size I use realloc, but doing it such way is very
> slow. Any better idea in C?
If you allocated n byte with realloc last time and you need n+1 or more,
allocate 2*n with realloc.
realloc already does so?
STL does something more clever?
Masatake
I am looking for a better way creating dynamic arrays in C. I have the
following problem. First I create an array with the size 1 then I
resized it to size 2 then to size 3 ... always by one as I do not know
the final size. For size I use realloc, but doing it such way is very
slow. Any better idea in C?
Thanks for your replies. One problem of the dxf output how the cubic
splines should be handled. The current solution is not very good, so if
you have a good idea, it would be great if the cubic splines will not
be converted to a set of lines but to the dxf splines that are in the
dxf format since version 13 o 14 I think.
By the way AutoTrace works readiliy also under MacOS. I never tried it
myself as I do not have a Mac but I was told by others.
Greetings
Martin
I have just spent a fair amount of time working on both DXF input and output
for my laser vector art application, LaserBoy. It can read a reasonable
subset of DXF entities {LINE, CIRCLE, ARC, ELLIPSE, POLYLINE, LWPOLYLINE and
TEXT} and it can write DXF in the form of LINE and POLYLINE. The reason it
only writes LINE and POLYLINE is because all laser vector art can be
expressed as only these things. I would guess that AutoTrace is similar in
this regard.
I can take a look at your project. I can't promise anything, because I have
not seen it yet. But I'll try to help.
I found this document to be very helpful.
http://www.autodesk.com/techpubs/autocad/acad2000/dxf/index.htm
This is my project.
http://www.akrobiz.com/laserboy
Take care. James. :o)
----- Original Message -----
From: Martin Weber
To: autotrace@yahoogroups.com
Sent: Sunday, October 22, 2006 2:27 PM
Subject: [AutoTrace] Autotrace - dxf output
I am the maintainer and programmer of AutoTrace. A very long time I was not
able to develope AutoTrace any further because of lack of time. No I plan to
proceed. One thing I would like to fix is the dxf output filter but I do not
have enogh knowledge about this format. Can anyone of you help to fix it?
Greetings
Martin
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Thanks man, I do have info on Dxf. Are you developing. auto trace to
be mac compatible?
http://www.autodesk.com/techpubs/autocad/acad2000/dxf/dxf_format.htmhttp://www.faqs.org/faqs/graphics/fileformats-faq/part3/section-45.html
for a start.
Jerry
On Oct 22, 2006, at 11:27 AM, Martin Weber wrote:
> I am the maintainer and programmer of AutoTrace. A very long time I
> was not able to develope AutoTrace any further because of lack of
> time. No I plan to proceed. One thing I would like to fix is the
> dxf output filter but I do not have enogh knowledge about this
> format. Can anyone of you help to fix it?
>
> Greetings
> Martin
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
>
>
> Yahoo! Groups Links
>
>
>
>
I am the maintainer and programmer of AutoTrace. A very long time I was not able
to develope AutoTrace any further because of lack of time. No I plan to proceed.
One thing I would like to fix is the dxf output filter but I do not have enogh
knowledge about this format. Can anyone of you help to fix it?
Greetings
Martin
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Tried it but isn't written completely. won't load or run, some programmers said I had to do stuff , did it . didn't work. Let me know if you get it working, would you? tired of trying. using Adobe streamline now.... not modifiable but less time invested and it just works.
I sent this message directly to the email address on Autotrace's
homepage, but, since it doesn't seem to have been actively developed
for quite a while, I decided to repost it here.
As an update, I made the changes the way they made sense to me and
things seem to work fine. I'm wondering if I'm dealing with a
cut-and-paste issue (centerline processing came after the
outline/contour functionality) or whether I'm just not understanding
something.
I will eventually be submitting my code changes to the project once
it's cleaned up and ready for general consumption.
Tom
-------- ORIGINAL EMAIL ----------
Hello Martin.
I'd like to start by thanking you for developing Autotrace. I am
currently making some modifications.
I have added support for the Stentiford thinning algorithm. I don't
know if it is better, but we were already using it elsewhere, so I
figured it would be faster to have it in Autotrace. I also added
support for just dumping the Splines to a text file for easy parsing
by other programs rather than all the other formats.
I have a question about the partial outline code (pxl-outline.c)
I have a situation where this is not working.
My text diagram:
X = already in the original open "outline"
W = I want this pixel too
U = Used in another curve
---U-
---WU
--X--
--X--
-X---
In this case, an open outline is found, starting from the upper-most X
going SOUTH.
When it is finished, it tries to find another partial outline to
combine with. Here is where I get confused.
If we're going SOUTH, it tries to find partial outlines in the
following directional order:
EAST
SOUTHEAST
SOUTHWEST
end-of-list
The comment states "If the outline is open (i.e., we didn't return to
the starting pixel), search from the starting pixel in the opposite
direction and concatenate the two outlines."
How is this the "opposite direction" ?
I would assume that it would use:
NORTH
NORTHEAST
NORTHWEST
Can you help me understand this? I don't want to break anything that
I don't understand.
Thank you in advance for any help you can give me.
Tom McKearney