Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

Debian removed the `freetype-config` utility in 2.8.1-1 from 2018:

This patch falls back if `freetype-config` is not available, using flag
values that work on my Debian-based system.

wchargin-branch: freetype-flags
wchargin-source: 470b23f596973e106ea6363c1f96fdc580f45152

Git stats


Failed to load latest commit information.
Latest commit message
Commit time
June 23, 2016 07:30
December 3, 2021 19:57
June 23, 2016 07:30
June 23, 2016 07:30
February 25, 2013 05:52
March 26, 2018 16:29
June 23, 2016 07:30
February 24, 2013 07:32
February 24, 2013 07:32

hiptext Build Status

hiptext is command line tool for rendering images and videos inside terminals.

Last Supper in Macterm

Happy Cat in Macterm

Obama in Macterm


You need clang or gcc >=4.7. You also need to install:

sudo apt-get install build-essential libpng12-dev libjpeg-dev \
    libfreetype6-dev libavformat-dev libavcodec-dev \
    libswscale-dev libgflags-dev libgoogle-glog-dev ragel


tar xvzf hiptext-0.2.tar.gz
cd hiptext-0.2

make -j4
sudo make install

If you get compile or link errors relating to freetype, and you do not have freetype-config(1) on your path, try modifying Makefile to adjust the LIBFREETYPE_CFLAGS and LIBFREETYPE_LIBS for your system.



Most image types, e.g. JPEG, PNG, GIF, etc. are supported.

hiptext balls.png


You can play videos in your terminal using hiptext. Yes, really.

youtube-dl -o gangnam-style.mp4
hiptext gangnam-style.mp4


hiptext --spectrum
hiptext --nocolor balls.png
hiptext --nocolor --chars=" .oO0" balls.png

Rendering Modes


By default, hiptext assumes you're using an xterm256 compatible terminal, e.g. gnome-terminal, without bothering to check the TERMINAL environment variable.

hiptext --xterm256 balls.png

To double the number of pixels using Unicode half blocks, consider using the following option, which may become the default in the future:

hiptext --xterm256unicode balls.png


The most beautiful terminal for hiptext is the one built into Mac OS X called This terminal uses xterm256 but it's implemented using a custom color palette that was chosen by designers rather than engineers.

But the interesting thing about this palette is that it uses slightly different colors for foreground and background. By using Unicode half blocks, this allows us to simulate something closer to 512 colors!

hiptext --macterm balls.png

However to use this, you must be using the black color scheme. After all, why would you use anything else?


If you want to render an image without the ANSI color escape codes, you can use the --nocolor flag. This will render the image using shaded unicode block characters.

hiptext --nocolor balls.png


The no-color mode supports a very simple character quantiser that can convert images to ASCII. Please understand that if this is what you want, there are much better tools for the job, like cacalib.

hiptext --nocolor --chars=" .oO0" balls.png


If you use a SIXEL terminal, e.g. mlterm >=v3.1.3, then the following flags can provide much more minute rendering:

hiptext --sixel256 balls.png           # For 256-color SIXEL terminal such as mlterm (>=v3.1.3)
hiptext --sixel16 balls.png            # For 16-color SIXEL terminal such as xterm(patch level >= #294) with "-ti vt340 option"
hiptext --sixel2 balls.png             # For monochrome SIXEL terminals



By default, hiptext assumes that your terminal background is black. If this is not the case, you can specify your background color using a CSS or X11 color string.

hiptext --bg=white balls.png