Skip to content

A dependency-free terminal-based image viewer. Includes a SNES Mode 7-like viewing mode.

Notifications You must be signed in to change notification settings

Cubified/affine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

affine

A dependency-free terminal-based image viewer, built with pure ANSI escape sequences (no ncurses). Capable of displaying images in the terminal using truecolor (16 million color) support, or 256-color support as a fallback. Also includes a SNES Mode 7-inspired viewing mode.

Screenshots

View mode:

View mode

Affine mode:

Affine mode

(Runs extremely smoothly in alacritty, GIF reduced to 10fps for filesize).

Compiling and Running

affine does not depend on anything other than the C standard library and stb_image, meaning it can be compiled with:

 $ make

And run with:

 $ ./affine [image file] [mode]

Where mode is one of:

  • view: View the image natively, with arrow keys to move and +/- to zoom -- if no mode is specified, this one is used
  • affine: View the image using a Mode 7 perspective transform, with arrow keys or WASD to navigate, E/C to adjust tilt, R/V to adjust height, and Q to quit

To-do

  • Animated GIF support
  • Rendering optimizations (high CPU usage from nonblocking input loop)
  • Simply math in affine mode

About

A dependency-free terminal-based image viewer. Includes a SNES Mode 7-like viewing mode.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published