print images to terminal with Kitty terminal graphics protocol
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-20 12:02:13 +01:00
src fetch individual env vars rather than the whole map 2026-03-27 10:26:48 +00:00
.build.yml fix typo in .build.yml 2026-03-10 00:44:02 +00:00
.gitignore implement basic functionality 2026-03-07 16:05:07 +00:00
build.zig add shm_open support 2026-03-12 09:44:51 +00:00
build.zig.zon implement basic functionality 2026-03-07 16:05:07 +00:00
LICENSE implement basic functionality 2026-03-07 16:05:07 +00:00
README update README to be plain text 2026-09-20 12:01:33 +01:00

 _______ __                  __          _______                             
|     __|__|.--------.-----.|  |.-----. |_     _|.--------.---.-.-----.-----.
|__     |  ||        |  _  ||  ||  -__|  _|   |_ |        |  _  |  _  |  -__|
|_______|__||__|__|__|   __||__||_____| |_______||__|__|__|___._|___  |_____|
                     |__|                                       |_____|      
 ______        __         __              
|   __ \.----.|__|.-----.|  |_.-----.----.
|    __/|   _||  ||     ||   _|  -__|   _|
|___|   |__|  |__||__|__||____|_____|__|  


---

Right now it only handles PNGs. Uses the kitty terminal graphics protocol in
direct mode to print an image to the console. Honestly, the terminal does most
of the work.

The program takes the bytes of the image, base64 encodes them, chunks them, and
dumps to stdout with each chunk wrapped in the appropriate escape code.

Todo:

 - Use stb_image to decode arbitrary image formats
 - Use "shm_open" to transfer the image via shared memory rather than dumping
   base64 encoded binary to the terminal.
 - For the base64 path, make the loop less branchy.
 - Give the project a better (unique) name.