Skip to content

AndrewSheff/ASCII-image-renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPM to ASCII Renderer

This is simple util, to render .ppm images in your terminal. Using RGB colors by using terminal control character like this:

printf("\e[48;2;%d;%d;%dm ", colors[r][c].red, colors[r][c].green, colors[r][c].blue);

No third-party libraries are used.

Build

You can build this with build.sh.

chmod +x build.sh
./build.sh

Usage

Interactive mode

./renderer

CLI mode

./renderer <filename.ppm> [--width N] [--height N] [--no-proportions] [--inter]

Argument Description
filename.ppm Path to PPM file (P6 binary format)
--width N Width in ASCII char
--height N Height in ASCII char
--no-proportions Off original proportions of image
--inter Enable interpolation (smoothing)

Examples

Without interpolation With interpolation
without_inter inter
./renderer test.ppm ./renderer test.ppm --inter

Requirements

Terminal with 24-bit color support (I use iTerm2 — great btw)

macOS / Linux (Windows WSL should work)

License

MIT © 2026 Andrew Shevtsov

About

🖼️ Simple terminal PPM images renderer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors