About the Image to ASCII Art
The picture is redrawn at the requested column count, each cell is reduced to one brightness value using the Rec. 709 luminance weights, and that value picks a character from a ramp ordered dark to light. Because a terminal cell is roughly twice as tall as it is wide, the vertical resolution is halved by default; the Cell height control exists for fonts where that assumption is wrong, such as a tightly leaded editor.
Six ramps are supplied. Classic uses ten punctuation marks and is the safest choice for a code comment. Detailed spreads seventy characters across the range and holds far more tonal detail, at the cost of looking noisy at small sizes. Unicode blocks give near photographic results in any monospaced font that ships the quarter block glyphs. Ones and zeros is a novelty that still reads as a picture from a distance.
Contrast is applied around the mid grey point before the character is chosen, which rescues flat photographs that would otherwise map to one or two characters. Invert swaps the ramp for terminals and code blocks that show light text on a dark background, where the untouched output looks like a photographic negative. Start around 80 to 120 columns: chat windows and README code blocks wrap somewhere near there, and a wider render will fold onto the next line and destroy the picture. Transparent areas are composited onto white first, so a logo with an empty background becomes empty space rather than a solid slab. For a coloured picture of source code instead, see Code to Image.
How to use
- Drop a photo, a logo or a screenshot onto the left pane.
- Set Columns to fit where the art is going, around 80 for a chat message.
- Try a different character ramp and raise Contrast if the result looks flat.
- Tick Invert for a dark terminal, then copy the text or download it.
Common questions
- Why does my ASCII art look stretched?
- Character cells are taller than they are wide. Lower the Cell height value if the picture still looks squashed in your font, or raise it if it looks tall and thin.
- Which picture works best?
- High contrast subjects with a clear silhouette, such as a logo, a portrait against a plain wall or a black and white photo. Busy scenes turn to noise.
- Will the art survive being pasted into chat?
- Only inside a code block or a monospaced font. Proportional fonts give every character a different width and the columns fall apart.
- What happens to transparent pixels?
- They are drawn onto a white background before the brightness is measured, so a transparent surround becomes blank space in the output.