Calibrated ASCII image reproduction
Process in progress. Planned implementation in browser using <canvas>
:
-
Generate character map
- Manually: Typewriter + scan - use blocks of each character to obtain more accurate measurement.
- Automatically: Render text to image using specific font.
For manual scans, adjust ‘grid’ width, height, rows, columns so each character (block) is separated.
Weigh each character and save into array of form
[ [weight (0-255), ASCII character] , [weight (0-255), ASCII character] , … ]Calculate aspect ratio correction - letter width : line height
-
Select image for ASCII conversion.
- Crop (realtime preview)
- Adjust B&W conversion color balance (realtime preview)
-
Input largest target dimension.
- No. of letters in 1 row for ‘portrait’
- No. of rows on a page for ‘landscape’
Use Floyd-Steinberg dithering to reduce image to ASCII ‘colors’ (weights as per array described in 3).
Generate text...