Jump to content

Delineate - A Raster/Bitmap to SVG Converter


v_kyr
 Share

Recommended Posts

D E L I N E A T E   -   A   R A S T E R    T 0    S V G    C O N V E R T E R


What is it?

Delineate is a tool for converting bitmap raster images to SVG (Scalable Vector Graphics) using AutoTrace or potrace. It displays SVG results using Apache Batik. Input formats are JPEG, PNG, GIF, BMP, TIFF, PNM, PBM, PGM, PPM, IFF, PCD, PSD, RAS. - Output format is SVG.

Delineate is distributed under the GNU General Public License, see the in the ZIP-archive included LICENSE.txt file.

For more information about Delineate, see http://delineate.sourceforge.net

NOTE: that the old original Delineate 0.5 version might not run anymore nowadays with actual Java runtime environments. Thus you should use delineate-0.6.zip, which is my refactored, slightly enhanced and adapted over Delineate 0.6 version here (see also below under Installing for it's distribution archive). Also note that my port of Autotrace 0.40.0 for MacOS (autotrace-0.40.0-MacOS-vkyr.zip) is different and more clean than the version found on GitHub. My version is compiled against El Capitan (MacOS 10.11.6) with all library dependencies, which the GitHub version isn't, the later (the GitHub version) needs probably at least High Sierra (MacOS 10.13), or Mojave (MacOS 10.14) and uses GraphicsMagick instead of the original ImageMagick, which I used and compiled against.


Installing

Installing - GNU/Linux & Mac OS X

1) To run Delineate, you will need to install the following software:

  •  AutoTrace 0.31.1  or  AutoTrace 0.40.0 (needs MacOS >= 10.13)   or   autotrace-0.40.0-MacOS-vkyr.zip (MacOS >= 10.11)

    NOTE:  that the above MacOS AutoTrace 0.40.0 versions are just CLI apps (command line programs) inside an app wrapper (AutoTrace.app) thus you can't start those as common OSX apps via double clicking. - You need always to access and run the autotrace CLI binary inside the app wrapper:
    -->  ...autotrace.app/Contents/MacOS/autotrace

           I suggest a user best makes a symbolic link from the binary inside the app wrapper to the Desktop or /usr/local/bin etc., thus like ...

            -->  ln -s /Users/<your-username>/Applications/autotrace.app/Contents/MacOS/autotrace  /Users/<your-username>/Desktop
          ... or ...
            -->  ln -s /Users/<your-username>/Applications/autotrace.app/Contents/MacOS/autotrace  /usr/local/bin

          ... so that you can point from inside of Delineate to the needed autotrace CLI binary then!
 


2) Set your JAVA_HOME variable to the location where you have Java installed.

3) Extract delineate-0.6.zip on to your machine.

4) To run:

     cd <install dir>/delineate
     chmod a+x delineate.sh
     ./delineate.sh

... or alternatively in a shell/terminal ...

   > cd <install dir>/delineate
   > java -jar delineate.jar

5) When you run a conversion for the first time, you'll be prompted to select the location of the autotrace or potrace application file. You must have these applications installed (see step 1).

   In the file chooser dialog window select the appropriate file:
      <autotrace install dir>/autotrace  
  or
      <potrace install dir>/potrace

 

Installing - Windows

1) To run Delineate, you will need to install the following software:

2) Set your JAVA_HOME environment variable to the location where you have Java installed.

   In Windows you can add this environment variable by going to:

     Start -> Settings
           -> Control Panel
           -> System
           -> Advanced
           -> Environment Variables

   Click the New button:
     - enter the variable name as JAVA_HOME, and
     - enter the variable value as the location where Java is installed,
       for example: C:\Program Files\J2SDK_13


3) Extract delineate-0.6.zip on to your machine

4) To run:

   Go to the directory:   <install dir>\delineate
   double click on or run the file:   delineate.bat

... or alternatively in a Powershell ...

   > cd <install dir>\delineate
   > java -jar delineate.jar


5) When you run a conversion for the first time, you'll be prompted to select the location of the autotrace or potrace application files. You must have
   these applications installed (see step 1).

   In the file chooser dialog window select the appropriate file:
      <autotrace install dir>\autotrace.exe

or
      <potrace install dir>\potrace.exe

 

Quick Delineate usage overview:

When Delineate starts it's main window should appear, where you first can on top select and switch which tracing tool, the Autotrace or Potrace tracer, to use for vectorization ...

gui_autotrace.jpg.375bf0c1e0a63639c0f9c58b23393ebf.jpg

gui_potrace.jpg.c8932ff606ee4e8169b84431f4cb0e1e.jpg

(1) The input file setting area

(2) The output file setting area

(3) The trace option settings area (there are always slightly more descriptive tooltip popup help strings shown when you hover over certain areas with the mouse)

(4) The run button, which when first time used will ask after where to find the path to the autotrace or potrace binary, which it needs to use ...

gui_app_notfound.jpg.b5bc8d6509bc7f663323d2652f6dd521.jpg

gui_where_potrace.jpg.ab2ef79503a540872121f78dbad1ed16.jpg

(5)+(6) The traced SVG result preview areas, the top area shows the actual trace result, the bottom area the previous traced result ...

gui_preview2.jpg.87d0c39e7c7296b3c71a79cb99b88d6c.jpg

There is a right click popup menu with command entries (which also show the keyboard shortcuts) you can use on both SVG preview areas ...

gui_preview1.jpg.4b5005d3c5ea8ca55d3b89977ff3d82b.jpg

... in order to zoom in/out and scroll around the view. Further you can inspect the generated SVG code (via View source) in an text view popup window ...

gui_srcview.jpg.553db9f08a444d97cae1fe28faccc2e5.jpg

... where you can select all (the keyboard shortcut is Cmd-/Ctrl-A) SVG code, or SVG code portions and copy (the keyboard shortcut is Cmd-/Ctrl-C) these to the system clipboard.

Some common usage screenshots:

del_potrace_600.jpg.240fa1ac0b2892919744db7028be7818.jpgdel_autotrace_600.jpg.53dedb07d42e5d3593d7916e293627f2.jpgdel_update_600.jpg.a7036c7bdb500cf03f00f738b263e1fc.jpg

 

Final words

I hope this raster to SVG converter GUI tool is useful for the one or other Affinity community member here then, regards v_kyr!

 

 

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

8 minutes ago, DEWLine said:

I wish I could read kanji and kana...

They're just being lazy about creating English info.
DragProtrace itself has English UI.
Download from here.
http://www.hi-ho.ne.jp/sato-akira/dragpotrace/DragPotrace_10.15.2.zip
 

And use Google Translate for more info.
https://translate.google.com/translate?sl=ja&tl=en&u=http://www.hi-ho.ne.jp/sato-akira/dragpotrace/

Link to comment
Share on other sites

26 minutes ago, ashf said:

FYI
if you're a Mac user, DragProtrace is easier to install. no Java needed.

It's also a good tool, but it just supports potrace, thus no color and centerline tracing etc. at all, also it's not portable usable between operating systems. - With Delineate you can access and run both, Potrace and AutoTrace, thus you can also perform color- and centerline tracing here then. And thanks to Java, the whole is portable between Windows/MacOS/Linux by reusing just one and the same JAR package!

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

55 minutes ago, Hilltop said:

Thanks for this tool and the extensive directions. However, I don't quite get which Java app I'm supposed to download. 

1) First of all you need to install (as far as you don't have these on your computer) ...

... for your operating system (Windows or MacOS), since those are pre requirements for the Delineate Java application, as it will call/run and use those!

2) Next (as far as you don't have any Java runtime system already installed on your computer) you need to install a general Java Runtime Environment (Java SE) for your OS on your computer. Ideally here a version Java 13 SE (or newer higher version number, aka Java 14 SE or Java 15 SE), so you can run and execute the Delineate Java application with that Java runtime environment then.

3) You need finally the delineate-0.6.zip archive, which contains the main Delineate Java application and it's dependent resources!

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

10 hours ago, v_kyr said:

2) Next (as far as you don't have any Java runtime system already installed on your computer) you need to install a general Java Runtime Environment (Java SE) for your OS on your computer. Ideally here a version Java 13 SE (or newer higher version number, aka Java 14 SE or Java 15 SE), so you can run and execute the Delineate Java application with that Java runtime environment then.

Thanks v-kyr, the installation instructions were clear enough but I didn't understand the Java part. I have Version 8 Update 281 on my system. Is that enough then? 

Link to comment
Share on other sites

42 minutes ago, Hilltop said:

Thanks v-kyr, the installation instructions were clear enough but I didn't understand the Java part. I have Version 8 Update 281 on my system. Is that enough then? 

I used Java 13 with backward Java 8 (v.1.8) compiler compliance, but for MacOS compatibility here I've added some Taskbar (Mac Dock) support, which usually was introduced in Java version 9 and upwards. - Thus you have to try if it still works with Java 8, otherwise just install an additional newer Java SE version too!

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

13 minutes ago, v_kyr said:

I used Java 13 with backward Java 8 (v.1.8) compiler compliance, but for MacOS compatibility here I've added some Taskbar (Mac Dock) support, which usually was introduced in Java version 9 and upwards. - Thus you have to try if it still works with Java 8, otherwise just install an additional newer Java SE version too!

Now I'm getting really confused and wonder if we're talking about the same Java app. I'm on Windows 10 64-bit and seem to have the latest version of Java Runtime Environment (1.8.0.281). Are you saying that, in addition to that, we need the Java Development Kit (JDK) or the Standard Edition (SE)?

Link to comment
Share on other sites

11 hours ago, Hilltop said:

Now I'm getting really confused and wonder if we're talking about the same Java app. I'm on Windows 10 64-bit and seem to have the latest version of Java Runtime Environment (1.8.0.281). Are you saying that, in addition to that, we need the Java Development Kit (JDK) or the Standard Edition (SE)?

A Java 1.8.0.281 JRE isn't the latest Java version, it's just the latest of the Java v1.8 line here! - In it's latest version state Java is nowadays actual at Java version 16/17 and thus not on the older Java version 8 (aka v1.8) line anymore. The 1.8 line is for backward compatibility. - Look on Oracles Java website about Java SE technologies and their versioning, or here.

However, as I said before, try it first with your Java 1.8.0.281 JRE version, if it works you are fine with that, otherwise install a newer higher version number!

 

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for letting us know about the program.

I'm curious as to how Delineate compares to the autotrace in Inkscape? Both use Potrace.

I have advocated doing photo preprocessing in Affinity Photo before using a trace program. Do something like this before the trace:

Transform any Photo into a Pencil Drawing (Affinity Photo Tutorial) - YouTube
https://www.youtube.com/watch?v=AesJUS2yO2c
 

Link to comment
Share on other sites

2 hours ago, Matt4 said:

I'm curious as to how Delineate compares to the autotrace in Inkscape? Both use Potrace.

Even both do make use of Potrace, or in case of Inkscape the embedded Potrace engine, there are quite some differences in overall processing and handling between Delineate and Inkscape here.

Delineate is more a GUI-Frontend to the external Potrace and Autotrace CLI tools, meaning here that it calls/runs external CLI processes, which it passes over made/adjusted settings and afterwards shows up a preview of the generated SVG result. It remembers the last made settings and also can persist (store/retrieve) the made settings for any later reuse. Delineate doesn't add much preprocessing of an input bitmap here beside what the external CLI tools offer on their own.

Inkscape in contrast makes use of an embedded/integrated Potrace engine and offers additionally to make/apply some adjustable preprocessing/prefiltering and color quantization of an input bitmap image in order to get good tracing results (see for example here). Inkscape also offers to perform some enhanced color tracing with Potrace, by performing some color quantization and multiple scans after detected colors with Potrace. The result will be then stacked layer color vector objects of an input image (see for example). - Further since Inkscape v1.0 the Autotrace library including the CenterlineTrace feature is also integrated in Inkscape, so it can perform centerline tracing now too.

So both tools will give due to their overall Potrace tracing algorithm usage similar looking results, though Inkscape allows overall some more internal fine tuning for bitmap image input preprocessing and also for vector output generation.

 

3 hours ago, Matt4 said:

I have advocated doing photo preprocessing in Affinity Photo before using a trace program.

Getting good tracing results always also highly relies on the quality of an input bitmap image. If needed one has to preprocess a bitmap image in a way that the tracing algorithms afterwards can better and cleaner vectorize a given input image.

☛ Affinity Designer 1.10.5 ◆ Affinity Photo 1.10.5 ◆ OSX El Capitan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.