potrace installation

Asked by Sujatha Harding

I am currently trying to trace a bitmapped image and convert it to vector graphic. The steps I have taken so far are:
1. scanned image (outline of a bear) and created a pdf file in photoshop
2. used illustrator 5 to create a svg file
3. imported svg into inkscape as my illustrator is a trial version and I will not have it for much longer!

I now want to trace the image in inkscape but the instructions in the manual say I should download potrace which I have done. Now I am having trouble installing potrace as I do not know what shell script is or where to type it.

I tried tracing the image in illustrator as well but got:
1. multiple images when I cut with my cricut machine. It didn't seem to know when to stop cutting the image and just kept going over the outline again and again
2. it also cut the bounding box around the bear which I did not require. Just the image, please!

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
su_v (suv-lp) said :
#1

Which platform are you working on? The Inkscape packages for Windows and Mac OS X already have potrace included internally, and potrace does its job when using menu 'Path > Trace Bitmap…' on an embedded or linked bitmap (aka raster) graphic.

There's a tutorial in menu 'Help > Tutorials > Tracing' explaining the basic usage, as well as a far more detailed manual page:
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Trace.html>

Revision history for this message
Sujatha Harding (sujathaharding) said :
#2

I see - so I get the tracing dialog box when I use Path>Trace Bitmap. However it does not seem to be doing anything. I have selected the bear in its bounding box and the status bar says Group of 1 object in Layer 1. When I click ok in the Trace Bitmap dialog box I get a message in the status bar saying "Select image to trace". So what step am I missing?

Also should I remove the bounding box before I go further? I do not want it in the final cutting but I do not know how to remove it.

Revision history for this message
Best su_v (suv-lp) said :
#3

You have to select the bitmap image itself for 'Tracing bitmap…', (verify the status line message "Image XXX x YYY, …"), not a group or vector object(s).

You cannot trace an image that already exists as vector data, nor can you trace a group. Potrace expects a single bitmap image (linked or embedded PNG, JPEG, GIF, etc.) in the selection.

If your image is inside the group - as you mention from the status line message - either ungroup it (Ctrl+U) or enter the group(s) with 'Ctrl+<Enter>' and select the image, or 'Ctrl+click' on the image to select it directly within (nested) groups but without changing the current drawing level (layer).

Revision history for this message
su_v (suv-lp) said :
#4

> Also should I remove the bounding box before I go further?
> I do not want it in the final cutting but I do not know how to remove it.

There is an option in the 'Trace Bitmap…' dialog to remove the background.

If that fails, you could consider using SIOX to separate an object from the background in a bitmap image, see <http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Trace-SIOX.html> for further details.

But before trying to figure out SIOX - depending on your settings used for tracing, you can edit the result of the tracing (since those are just regular albeit complex paths) using normal Inkscape tools. If the background has a flat color, usually you can delete that path from within the group of stacked path (or delete the nodes if you didn't use a multi-scan option).

I'd recommend to first go through the tutorial 'Help > Tutorials > Inkscape: Tracing' and maybe the small example from the manual too: <http://tavmjong.free.fr/INKSCAPE/MANUAL/html/ATracingExample.html>

Revision history for this message
Sujatha Harding (sujathaharding) said :
#5

I have now started over - I imported the bear as a GIF file instead of an SVG file. Now the message in the status bar after I select the bear (which is just an outline sketch) is: Image 700 x 804 embedded in layer 1. When I bring up the Trace Bitmap box I have clicked on remove background and made the number of scans 2 (I only really want a single scan but I don't know how to choose single scan over multiple scan). The brightness cutoff is set at 0.450. However when I click on update I do not get a preview. And when I click ok I get a message in the status bar saying "select 1 image and 1 or more shapes above it". I am not sure what is happening as I thought I selected the bear with the select tool.

Revision history for this message
Sujatha Harding (sujathaharding) said :
#6

Hang on, I just unclicked the SIOX foreground selection box and got an image of the bear when I clicked ok in the Trace Bitmap dialog box. So I will continue to work on this.... Thanks for your help.

Revision history for this message
su_v (suv-lp) said :
#7

In case you are working on Windows - there is a small glitch with the preview function of the 'Trace Bitmap…' dialog on Windows when using 'Single scan > Brightness cutoff' (doesn't affect the actual result, only the small preview):

Bug #631444 “Trace bitmap preview broken”
<https://bugs.launchpad.net/inkscape/+bug/631444>