Skip to content

A tool for converting image pixels in uft8 characters.

License

Notifications You must be signed in to change notification settings

lucarin91/halftone-glyph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Halftone Glyph: Image Converter

Halftone Glyph, a tool inspired by the halftone printing technique, generates images in which pixels are substituted by characters. The brightness of the pixel is encoded with the size of the character.

The tool can be used trough the command line program hatogl that is available for Windows, Mac, and Linux.

Usage

Download from here the correct version of the tool for your Operating System. Extract the archive and move to a desirable location. Then, open a terminal and use it.

For instance the following command uses the characters @,?,=,# to draw the image michael.png:

hatogl data/michael.png --glyph="@?=#" --tile=15 --font=DejaVuSerif --out=michael_gliph.png
  • --glyph, characters to be used
  • --tile, maximum size of the characters
  • --font, name or file of the font
  • --out, output path of the image

All the above parameters are optional, by default HalftoneGliph uses a system monospace font and the @ character. There is also the possibility to disable the randomness of the characters passing the --no-random parameter.

Use as a Library

HalftoneGliph can be used also as a Rust library. After including the library as dependency, use the function image_to_unicode to transform an image.

Acknowledgment

HalftoneGlyph is implemented in Rust and uses image to load and save images and font-kit to load fonts and render characters.

License

MIT License

About

A tool for converting image pixels in uft8 characters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages