Skip to content

Latest commit

 

History

History
83 lines (51 loc) · 2.06 KB

File metadata and controls

83 lines (51 loc) · 2.06 KB

Rez

Raster image edge vectorizer.

Installation

Install the DMD 2 compiler (using the MinGW setup option on Windows).

Build the executable with the following command line :

dmd -m64 rez.d color.d png.d

Command line

rez [options]

Options

--read-png <image path> [minimum luminance] [maximum luminance] [first luminance] [last luminance] : read an image in PNG format
--binarize <minimum luminance> : binarize the image
--trace <maximum luminance distance> <mask definition> ... : trace the lines
--vectorize <minimum luminance> <maximum position distance> : vectorize the edges
--write-png <image path> [pixel color] : write the image in PNG format
--write-svg <drawing path> [line width] [line color] : write the edges in SVG format
--write-obj <mesh path> [pixel size] [edge height] : write the edges in OBJ format

Mask definition

<image path|width.height>@[maximum bad pixel count]:[rotation count]/[rotation angle]

Examples

rez --read-png test.png 64 255 255 0 --trace 128 4.12@3:2 --write-png OUT/test.png

Traces the lines of an image and writes them in PNG format.

rez --read-png test.png --vectorize 128 0.5 --write-svg OUT/test.svg 1 --write-obj OUT/test.obj 0.01 2.5

Vectorizes the edges of an image and writes them in SVG and OBJ format.

Dependencies

Limitations

Only supports PNG files.

Version

1.0

Author

Eric Pelzer (ecstatic.coder@gmail.com).

License

This project is licensed under the GNU General Public License version 3.

See the LICENSE.md file for details.