Yet another piece of code that draws images in the terminal. Now written in C!
Bonus support for animated GIFs.
"Animated" GIF in the terminal
Colored background without ASCII characters
Alpha channel support
pterm FILE [-b] [-w output_width] [-h output_height] [-t file_type]
-
FILE
: path to an RGB-convertible image file -
-b
: color 'background' instead of ASCII characters -
-w
: specify output width (mutually exclusive with-h
) -
-h
: specify output height (mutually exclusive with-w
) -
-t
: image format; relevant if the input image is piped viastdin
Supported image formats: JPEG, PNG, TGA, BMP, PSD, GIF, HDR, PIC, PNM (see details in stb_image.h)
If you wish to include pterm
in your project:
#define PTERM_IMPLEMENTATION
before including pterm.h
to create the implementation.
Please don't judge the code, it's just an excercise to prevent me from completely forgetting how to C.
Clone & make. Of course you can use CMakeLists.txt
as well but it's just there for future Windows support.
Not supported yet; not until I figure out how to convince a Windows terminal to recognize ANSI colors.
None (apart from a C compiler and make
/CMake
). Included external sources: