Print images to the terminal using SIXEL

SIXEL is a protocol for printing images to a terminal. It was made for the Digital Equipment Corporation's VT series of computer terminals. It is the best thing ever.
It is very easy to use. (From the command line:)
img2sixel foo.jpg
This will "print" foo.jpg (as a picture) to the terminal.
This is great! It is so easy!
It used to be that you could draw pixels to the screen directly. This was back in the olden days, before the GUI. What happened after that was a series of new and constantly changing and constantly abandoned ways to draw a picture to the screen. Meanwhile, the terminal hasn't changed much and very old terminal programs still work. I want to write a program and have it still work many years later, and I want to use graphics too. SIXEL is a good solution. It is old, standardized, historical, and best of all, it was made by a defunct company. It is not going to change!
I intend to use SIXEL for graphical programs that can display a picture of their internal state. Basically, you will see a picture, and then you can enter a command, after which you get a new picture. Basically a combination of a text based menu driven program and a graphical interface, but not yet a full GUI with clicky-click mouse clicks. You could still get some real work done like this!
Ok, back to the drawing part. I should be able to draw a picture to the screen with pixels. It seems that many of the graphics toolkits, APIs, or windowing systems are set up to discourage this. Mostly because someone has decided that it is too slow to allow direct pixel access. This was decided a long time ago (decades ago). Computers have gotten faster, so maybe computers are fast enough now. Maybe the user is willing to wait. Maybe computers will be faster in the future. Who has even tried this stuff lately?
I can write a bitmap file directly or I could use netpbm image formats. I can convert those to SIXEL or I could directly output SIXEL format text. This is great because whatever graphics API or GUI or windowing system you are likely using today won't be available in the future, but the DEC VT series of terminals will be available! (and probablty Tcl/Tk too!) You shouldn't have to rewrite your software when some resume-padding software developer invents yet another way to draw computer graphics.
You will need a SIXEL compatible terminal to use SIXEL. If you are using Windows, the Terminal app supports SIXEL. If you are using Linux and X11, then you can use xterm ( as /usr/bin/xterm -vt 340;). If you are using Linux and Wayland, I have found that foot https://codeberg.org/dnkl/foot works well.
A list of terminals and sixel support status can be found here: https://www.arewesixelyet.com/
The SIXEL libraries and utility programs are available at: https://github.com/saitoha/libsixel . You can also get them from apt/synaptic on Ubuntu.
So, I did this and it changed my life.

