Input Mode
Image Input
Drop image here or click to browse
PNG, JPEG, GIF, WebP, BMP, SVG, TIFF · Max 20 MB
Character Set
Resolution
Brightness & Tone
Sampling & Dithering
Edge-Aware Rendering
Color & Output
BG:
Text:
Post-Process Filters
Output
Dims: Chars: Render:
Load an image, enter text, or start webcam, then click Render
Character Density Calibration
Ink density per glyph in the current character set. Measured by 32×32 rasterisation. Sorted light→dark.
Character Frequency Distribution
Frequency of each character in the latest ASCII output. Ideal output uses the full range of the charset.
Top Character Distribution
Donut chart of the 12 most frequent characters. Remaining grouped as "…".
Edge Detection Preview (Sobel)
Sobel gradient magnitude of the source image. Bright = strong edges used for glyph selection.
Sampling Method Comparison
Side-by-side thumbnail preview of area average (SAT), bilinear, and point/nearest sampling.
Render Performance Timeline
Render time (ms) for the last 100 renders. Tracks performance trends across parameter changes.
Export & Share
CSV includes character frequency analysis. JSON includes full render options, density calibration, and performance history. HTML is a self-contained page. "Export All" downloads TXT + PNG + SVG + JSON + CSV.
Character Set Comparison

Compare all 7 built-in character sets: glyph count, density range, monotonicity (whether density strictly increases from light to dark). Helps select the optimal charset for your source material.

Click "Compare all charsets" to run analysis.
Performance Benchmark

Runs 10 render iterations with the current settings and reports average, min, max, and spread.

ASCII Art & Image Processing Standards
ASCII Standard (ANSI X3.4-1986 / ISO 646)

ASCII (American Standard Code for Information Interchange) defines 128 characters: 33 non-printing control codes and 95 printable characters (space through tilde). Standardised as ANSI X3.4-1986 and internationally as ISO/IEC 646:1991.

ASCII art uses the 95 printable characters (0x20–0x7E) as a visual medium, mapping pixel brightness to character darkness (ink density). The technique dates to the 1960s when line printers were the primary output device.

Key constraint: Each character occupies a fixed-width cell, making monospaced fonts essential. Character width-to-height ratio (typically ~0.5) defines the aspect correction needed for accurate reproductions.

Unicode Block Elements (U+2580–U+259F) & Braille Patterns

Block Elements (U+2580–U+259F): 32 characters providing quarter-cell and eighth-cell resolution patterns: ░ (light shade, ~25%), ▒ (medium, ~50%), ▓ (dark, ~75%), █ (full block). Defined in Unicode 1.1 (1993).

Braille Patterns (U+2800–U+28FF): 256 characters representing all combinations of an 8-dot (2×4) Braille cell. Each character encodes a unique 2×4 binary pattern, providing 8× sub-cell resolution. Used for high-resolution terminal graphics.

Box Drawing (U+2500–U+257F): 128 characters for line drawing: single/double/heavy horizontal, vertical, and corner pieces. Used for structural ASCII art and framing.

Image Sampling Theory (Nyquist-Shannon)

Nyquist-Shannon sampling theorem: To accurately represent a signal, the sampling rate must be at least twice the highest frequency component. In image-to-ASCII conversion, each output character cell samples a rectangular region of the source image.

Area averaging (SAT): Uses summed-area tables (Crow 1984) for O(1) computation of the mean value of any rectangular region. This is the highest-quality downsampling method as it integrates all pixels in the cell.

Bilinear interpolation: Samples 4 neighbouring pixels and linearly interpolates. Faster than area averaging but introduces blur.

Point/Nearest: Samples the single nearest pixel. Fastest but prone to aliasing - fine details may be missed or misrepresented.

Dithering Theory (Floyd-Steinberg & Bayer)

Error diffusion (Floyd-Steinberg 1976): After quantising each pixel to the nearest available level, the quantisation error is distributed to unprocessed neighbouring pixels using a specific kernel. This creates the illusion of intermediate tones using only the available character set.

Floyd-Steinberg kernel: Distributes error: 7/16 right, 3/16 below-left, 5/16 below, 1/16 below-right. Total weights sum to 1.0. Serpentine (alternating left-right) scanning reduces directional artefacts.

Ordered dithering (Bayer 1973): Uses a threshold matrix (Bayer matrix) to decide quantisation per pixel. The matrix is tiled across the image. Bayer 4×4 has 16 threshold levels; 8×8 has 64 levels. Produces a regular cross-hatch pattern rather than the organic texture of error diffusion.

Trade-off: Error diffusion produces higher visual quality but is sequential (each pixel depends on previous errors). Ordered dithering is fully parallel and cache-friendly but produces visible patterning.

Edge Detection (Sobel Operator)

Sobel operator (Sobel & Feldman 1968): A discrete differentiation operator computing the gradient magnitude of image intensity. Uses two 3×3 convolution kernels (Gx for horizontal, Gy for vertical edges).

In ASCII art, edge detection is used for edge-aware glyph selection: at positions with strong edges, characters with directional strokes (|, -, /, \) are preferred over density-only characters, improving structural fidelity.

Linear-light luminance: Edge detection should operate on linearised (gamma-decoded) luminance to avoid gamma-induced artifacts near shadow boundaries.

Luminance & Brightness Standards

Rec. 601 luminance: Y = 0.299R + 0.587G + 0.114B. Used for standard-definition video. The most common brightness algorithm for ASCII art due to its perceptual accuracy.

Rec. 709 luminance: Y = 0.2126R + 0.7152G + 0.0722B. Used for HD video and sRGB displays. This tool's Sobel edge detector uses Rec. 709 for linear-light computation.

HSL Lightness: L = (max(R,G,B) + min(R,G,B)) / 2. Simple but less perceptually accurate - treats all hues equally regardless of human sensitivity differences.

Average: Y = (R + G + B) / 3. Mathematically simple, perceptually inaccurate. Overweights blue and underweights green compared to human perception.

Gamma Correction (sRGB / IEC 61966-2-1)

sRGB gamma (IEC 61966-2-1:1999): Display devices have a non-linear transfer function. sRGB defines a piecewise gamma: linear below 0.0031308, and C^(1/2.4) scaled above. The effective gamma is approximately 2.2.

In ASCII art: Gamma correction adjusts the brightness-to-character mapping curve. Gamma <1.0 brightens (lifts shadows), gamma >1.0 darkens (crushes shadows). Default gamma = 1.0 (no correction). For best results with photographic images, try gamma = 1.1–1.4 to compensate for the discrete nature of character brightness.

Mathematical Models and Formulas

Brightness / Luminance Algorithms:

Rec. 601 Luminosity (default):
Y = 0.299 * R + 0.587 * G + 0.114 * B

Rec. 709 Luminance (used in Sobel):
Y = 0.2126 * R + 0.7152 * G + 0.0722 * B

Average:
Y = (R + G + B) / 3

HSL Lightness:
L = (max(R, G, B) + min(R, G, B)) / 2

Character mapping:
index = floor(Y / 255 * (charset.length - 1))
char = charset[index]
(Optionally inverted: index = charset.length - 1 - index)
Research, Standards and Citations

Character Encoding & ASCII Art

[1] ANSI (1986). ANSI X3.4-1986 — Coded Character Set — 7-Bit American National Standard Code for Information Interchange. American National Standards Institute.

[2] ISO/IEC 646:1991. Information technology — ISO 7-bit coded character set for information interchange.

[3] The Unicode Consortium (2023). The Unicode Standard, Version 15.1. Block Elements (U+2580–U+259F), Braille Patterns (U+2800–U+28FF), Box Drawing (U+2500–U+257F).

[4] Carlini, N. & Wagner, D. (2017). Adversarial examples are not easily detected: Bypassing ten detection methods. Proc. ACM Workshop on Artificial Intelligence and Security. (Discusses text-based visual encoding at scale.)

Image Sampling & Downscaling

[5] Crow, F.C. (1984). Summed-area tables for texture mapping. Proc. SIGGRAPH '84, 207-212. ACM. DOI: 10.1145/800031.808600

[6] Shannon, C.E. (1949). Communication in the presence of noise. Proc. IRE, 37(1), 10-21. DOI: 10.1109/JRPROC.1949.232969

[7] Mitchell, D.P. & Netravali, A.N. (1988). Reconstruction filters in computer graphics. Proc. SIGGRAPH '88, 221-228. ACM.

Dithering & Quantisation

[8] Floyd, R.W. & Steinberg, L. (1976). An adaptive algorithm for spatial greyscale. Proc. SID, 17(2), 75-77.

[9] Bayer, B.E. (1973). An optimum method for two-level rendition of continuous-tone pictures. Proc. IEEE International Conference on Communications, 26, 11-15.

[10] Ulichney, R.A. (1987). Digital Halftoning. MIT Press. ISBN: 978-0-262-21009-7

[11] Knuth, D.E. (1987). Digital halftones by dot diffusion. ACM Transactions on Graphics, 6(4), 245-273.

Edge Detection & Image Processing

[12] Sobel, I. & Feldman, G. (1968). A 3×3 isotropic gradient operator for image processing. Presented at Stanford Artificial Intelligence Project.

[13] Canny, J. (1986). A computational approach to edge detection. IEEE Trans. Pattern Analysis and Machine Intelligence, 8(6), 679-698. DOI: 10.1109/TPAMI.1986.4767851

[14] Gonzalez, R.C. & Woods, R.E. (2018). Digital Image Processing, 4th Ed. Pearson. ISBN: 978-0-13-335672-4

Color Science & Display Standards

[15] IEC 61966-2-1:1999. Multimedia systems and equipment — Colour measurement and management — Part 2-1: Colour management — Default RGB colour space — sRGB.

[16] ITU-R BT.601-7. Studio encoding parameters of digital television for standard 4:3 and wide-screen 16:9 aspect ratios.

[17] ITU-R BT.709-6. Parameter values for the HDTV standards for production and international programme exchange.

About this tool

This tool implements a research-grade ASCII art pipeline with summed-area-table sampling, Floyd-Steinberg and Bayer dithering, Sobel edge-aware glyph selection, per-font density calibration, gamma correction, 4 render modes, and multi-format export — entirely client-side (zero network). StaticFlow ASCII Engine v3.1 by Auric Artisan.

Research Backend
Client-side
Batch Text Rendering

Enter multiple text strings (one per line). Each will be rendered with the current settings and benchmarked. Useful for comparing rendering performance across different inputs.

Click Run Batch to render and benchmark each text input.
Charset Density Deep-Dive

Detailed density analysis of each character in the current charset. Shows measured ink coverage, monotonicity check, and density curve linearity. Run after changing charset or font for accurate calibration data.

Density calibration is computed automatically on page load and after each charset change. See the "Character Density Calibration" graph in the Lab tab for visualisation. Use the JSON export (Actions tab) to obtain raw density values for external analysis.
Edge-Aware Quality Metrics

Research note: the edge-aware glyph selection system uses a two-stage approach — first computing Sobel gradient magnitude and direction on linear-light luminance, then selecting directional glyphs (|, -, /, \) at positions where the gradient exceeds a threshold modulated by the edge strength slider.

Edge Detection Quality Factors:

1. Source resolution vs output columns ratio
   Higher ratio = more source pixels per cell = better edge detection

2. Linear-light conversion before Sobel
   Avoids gamma-induced false edges in shadow regions

3. Edge strength threshold (0.0 - 1.0)
   0.0 = all positions treated as edges (structural only)
   0.65 = default balanced setting
   1.0 = only strongest edges trigger directional selection

4. Character set coverage
   Requires directional glyphs: | - / \ + for meaningful edge rendering
   Block and Braille charsets have limited directional information
Compression & Glyph Thinning Model

The compression slider (0.0–0.95) applies glyph thinning by probabilistically replacing characters with spaces. This creates a sparse, minimalist aesthetic while preserving high-contrast features.

Compression algorithm:

For each output character position:
  brightness = cell_brightness (0-1, normalised)
  threshold = 1.0 - compression_level
  rand = xorshift32(seed++) / 2^32

  if brightness < threshold AND rand < compression_level:
    output = ' ' (space — suppress glyph)
  else:
    output = normal_char_mapping(brightness)

Properties:
- Deterministic via xorshift32 PRNG (seed: 2654435769)
- Preserves high-brightness features (dark areas in output)
- Creates organic stippling effect at compression 0.3–0.6
- Above 0.8 only strongest features survive
Deterministic RNG (xorshift32)
xorshift32 (Marsaglia 2003):

function xorshift32(state):
  state ^= state << 13
  state ^= state >>> 17
  state ^= state << 5
  return state

Period: 2^32 - 1
Default seed: 2654435769 (Knuth multiplicative constant)

Used for: temporal dithering, noise filter, compression.
Same seed + same input = identical output (reproducible).