Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .gitattributes

This file was deleted.

44 changes: 0 additions & 44 deletions .gitignore

This file was deleted.

8 changes: 7 additions & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jankovicsandras.imagetracer-java</name>
<name>imagetracer</name>
<comment></comment>
<projects>
</projects>
Expand All @@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
2 changes: 0 additions & 2 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

11 changes: 0 additions & 11 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

Binary file removed ImageTracer.jar
Binary file not shown.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Simple raster image tracer and vectorizer written in Java for desktop. See https
by András Jankovics

This is a port of imagetracer.js: https://github.com/jankovicsandras/imagetracerjs
### 1.1.4

- No changes in algorithm
- Ported the project setup to maven

### 1.1.3

- Imported Quantize.java by Adam Doppelt to replace the old quantization algorithm, which, because it was based on K-means, it averaged the colors, resulting in a non-intuitive final result, where the palette was less saturated than the original.
- Refactored the code so that it is distributed along smaller files.


### 1.1.2

Expand All @@ -24,15 +34,16 @@ This is a port of imagetracer.js: https://github.com/jankovicsandras/imagetracer
- ```IndexedImage``` has width and height
- ```getsvgstring()``` needs now only ```IndexedImage``` (tracedata) and ```options``` as parameters
- ```colorquantization()``` needs now only ```imgd```, ```palette``` and ```options``` as parameters
- background field is removed from the results of color quantization
- background field is removed from the results of color quantization

### Running as a standalone program
### Running as a standalone program

Warning: if the outfilename parameter is not specified, then this will overwrite <filename>.svg .

Basic usage:
Basic usage:
```bash
java -jar ImageTracer.jar smiley.png
mvn package
java -jar target/ImageTracer-1.1.4.jar smiley.png
```

With options:
Expand All @@ -41,7 +52,7 @@ java -jar ImageTracer.jar smiley.png outfilename output.svg ltres 1 qtres 1 path
```

### Including in Java projects
Add ImageTracer.jar to your build path, import, then use the static methods:
Add ImageTracer-1.1.4.jar to your build path, import, then use the static methods:
```java
import jankovicsandras.imagetracer.ImageTracer;

Expand Down Expand Up @@ -112,7 +123,7 @@ See [options for deterministic tracing](https://github.com/jankovicsandras/image
|```imageToTracedata```|```BufferedImage image, HashMap<String,Float> options /*can be null*/, byte [][] palette /*can be null*/```|```IndexedImage /*read the source for details*/```|
|```imagedataToTracedata```|```ImageData imgd, HashMap<String,Float> options /*can be null*/, byte [][] palette /*can be null*/```|```IndexedImage /*read the source for details*/```|


#### Helper Functions
|Function name|Arguments|Returns|
|-------------|---------|-------|
Expand All @@ -123,7 +134,7 @@ See [options for deterministic tracing](https://github.com/jankovicsandras/image
```ImageData``` is similar to [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData) here.

There are more functions for advanced users, read the source if you are interested. :)

### Options
|Option name|Default value|Meaning|
|-----------|-------------|-------|
Expand Down
46 changes: 0 additions & 46 deletions deterministic.md

This file was deleted.

Binary file added docimages/quantization/correctly_quantized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docimages/quantization/original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading