Image to ASCII art
image_ascii_artConvert an image into ASCII art text or a rendered PNG using character ramps, with adjustable contrast, brightness and inversion for light-on-dark output.
Instructions
Turn an image into ASCII art: each character cell takes the average brightness of its area (cells are twice as tall as wide) and maps it onto a character ramp: standard " .:-=+*#%@", detailed (70 characters), blocks " ░▒▓█", simple, binary, or your own. Contrast, brightness and invert (for light text on dark backgrounds). Returns the text; format "png" also renders it to an image (optionally in the image's colours). Transparent areas count as white paper. Web version: https://s3eidat.github.io/ascii-art/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ramp | No | Character set, light → dark. Default standard. | standard |
| color | No | PNG only: colour each character with the image colour. | |
| image | Yes | The image: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI). | |
| format | No | text (default) or png (also writes <name>-ascii.png). | text |
| invert | No | For light text on a dark background. Default false. | |
| output | No | Where to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set). | |
| columns | No | Characters per line. Default 100. | |
| contrast | No | -100 … 100. Default 0. | |
| brightness | No | -100 … 100. Default 0. | |
| customRamp | No | Characters for ramp "custom", from no ink to most ink (at least 2). | .oO0@ |