Skip to content

Display images in TTY using the Linux Framebuffer!

License

Notifications You must be signed in to change notification settings

jd-develop/fbimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fbimg: display images in the Linux Framebuffer

Display images in tty using the Linux Framebuffer!

Original code found in Qt Documentation, a little bit modified by Hugo Rodde.

The stb_image library is part of the stb single-file public-domain libraries collection.

Supports every image format supported by stb_image.h (jpeg, png, bmp, hdr, psd, tga, gif, pic, psd, pgm, ppm).

Only the first image of animated gifs is displayed.

Compiling

GNU/Linux

Simply use

gcc -o fbimg fbimg.c -lm

Other OSes using the Linux kernel

I assume that if you use such OS (and want to compile this program) you know how to compile C code.

Other OSes

Sadly, the Framebuffer is a linux-only feature.

Usage

./fbimg path/to/img.png

Important

You need either to run it as root, either to add yourself in the video group!

Roadmap

  • Use stbimg instead of libpng to support more image formats
  • Allow the user to draw at any position on screen via CLI arguments
  • Allow the user to crop the image via CLI arguments
  • Add an option to rezise the image if it is too big for the screen (using this for example)
  • Add -v (--verbose) that print the commented stuff
  • Add -h (--help)
  • Support videos
    • Get videos frame by frame and display each frame
    • Arrow keys to skip 5 seconds

About

Display images in TTY using the Linux Framebuffer!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages