Skip to content

wrwrwr/glyphify

Repository files navigation

glyphify

A toy command-line utility to approximate an image using a fixed set of glyphs.

glyphify <glyphs> <image>

Examples

Binary Rose

For a start, lets redraw an image with just zeros and ones:

glyphify matrix examples/rose.jpg

A red rose

Matrix rose

Dotted Landscape

The dot glyphset has just a single dot glyph, and more than the default 2500 of these are needed to compose a larger picture:

glyphify dot examples/landscape.jpg -n 20000

Tatras landscape

Dotted landscape

Mathy Euler

For a very sharp image and complex glyphs we need more extensive search and a looser acceptance condition:

glyphify math examples/euler.jpg -q 30000 --min_value -2.7

Euler's identity

Mathy identity

You could also add --min_opacity 1 to avoid the symbolic background. Or try glyphify --help for a full list of options.

Installation

Make sure you have LuaJIT and Torch installed and type:

luarocks install glyphify

License

The code is licensed under MIT. The included glyphs were extracted from DejaVu Serif font which is covered by a generous license.

About

Redraw an image using glyphs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published