Skip to content

yrwq/aimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

aimg

A program that converts images into ASCII

features

  • full 24-bit ANSI color support
  • edge detection for enhanced detail
  • percentile-based contrast stretching
  • bayer matrix dithering for smooth gradients
  • adjustable gamma for brightness tuning

building

cc -Wall -O2 -o aimg main.c -lm

usage

./aimg <image> [options]

options

Option Description Default
-w <width> Output width in characters 120 (auto-detects terminal)
-a <aspect> Character aspect correction 0.5
-g <gamma> Gamma correction 0.8
-i Invert character ramp Disabled
--color Enable 24-bit color output Enabled
--no-stretch Disable contrast stretching Disabled
--lo <pct> Low percentile cutoff (0-49) 1
--hi <pct> High percentile cutoff (51-100) 99
--dither <n> Dither strength (0-12) 4
--edge Enable edge enhancement Disabled
--edge-mix <0..1> Edge mixing ratio 0.5
--edge-gain <x> Edge gain multiplier 1.0

About

image to ascii

Resources

Stars

Watchers

Forks

Contributors