Calibrated ASCII image reproduction

character-map-half-spacing.png

Process in progress. Planned implementation in browser using <canvas>:

  1. Generate character map

    • Manually: Typewriter + scan - use blocks of each character to obtain more accurate measurement.
    • Automatically: Render text to image using specific font.
  2. For manual scans, adjust ‘grid’ width, height, rows, columns so each character (block) is separated.

  3. Weigh each character and save into array of form
    [ [weight (0-255), ASCII character] , [weight (0-255), ASCII character] , … ]

  4. Calculate aspect ratio correction - letter width : line height

  5. Select image for ASCII conversion.

    • Crop (realtime preview)
    • Adjust B&W conversion color balance (realtime preview)
  6. Input largest target dimension.

    • No. of letters in 1 row for ‘portrait’
    • No. of rows on a page for ‘landscape’
  7. Use Floyd-Steinberg dithering to reduce image to ASCII ‘colors’ (weights as per array described in 3).

  8. Generate text based on above settings (realtime preview)

  9. Optionally: Show preview using target font (requires extra process for typewriter fonts)

  10. Optionally: Reduce character map or manually edit weights (ie. to remove superscript characters or increase perceived weight of #)

 
1
Kudos
 
1
Kudos

Now read this

TIDAL: music streaming for fussy audiophiles (like me!)

I call myself an audiophile even though I don’t fit a lot of the stereotypes. You won’t find me bragging about my pure silver ‘interconnects’. (Heck, the speakers I’m listening to now are hooked up with solid-core ethernet cable.)... Continue →