This repository describes a procedure for using any image to generate another with randomized* binary as its foreground and whitespace as its background.
*The foreground edges are configured to consist of "1" characters to ensure a more crisp delineation between the foreground and the background.
- Use https://cloudapps.herokuapp.com/imagetoascii/ to generate ASCII text from an input image (e.g.
charlotte_skyline.jpg
), using a custom charset of01
. - Click "Copy to Text" and paste the contents into a text file e.g.
imagetoascii.txt
. - Manually modify
imagetoascii.txt
to correct/improve appearance, as needed. - Run
ascii_customizer.py
to remove the image background and randomize the foreground binary (except for the edges, which are set to "1"s).customized_ascii.txt
is automatically generated. - Use the "Copy to HTML" feature of the web service from step 1 to create an
customized_ascii.html
file. - Replace the content of the
pre
element incustomized_ascii.html
to include the text contained withincustomized_ascii.txt
. If upon previewingcustomized_ascii.html
in your browser, the image is distorted, try pasting the ASCII content using a different text editor. - Optionally, customize the CSS styling of the
pre
element to change the foreground font and background color. - Use WebVector to generate an SVG based off of
customized_ascii.html
. - Use cloudconvert to generate PNGs of variable resolutions, as needed.
- Crop PNGs as needed.