print images to terminal with Kitty terminal graphics protocol
- Zig 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .build.yml | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| LICENSE | ||
| README | ||
_______ __ __ _______
| __|__|.--------.-----.| |.-----. |_ _|.--------.---.-.-----.-----.
|__ | || | _ || || -__| _| |_ | | _ | _ | -__|
|_______|__||__|__|__| __||__||_____| |_______||__|__|__|___._|___ |_____|
|__| |_____|
______ __ __
| __ \.----.|__|.-----.| |_.-----.----.
| __/| _|| || || _| -__| _|
|___| |__| |__||__|__||____|_____|__|
---
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.