I've created a minimal Linux system which boots to the console and does not contain any kind of graphical environment.
I now want to display an image file from my C program or a bash script on the screen.
How can I do this?
If your system has a framebuffer device, i.e. /dev/fb0, then there's the fbv framebuffer viewer utility for JPEG, GIF, PNG, and BMP images. (It's available as a target package in Buildroot.)
And if you have a suitable raw image (e.g. a framebuffer capture), then that file can be written directly to the framebuffer device.
See Super fast Linux splashscreen for more details.
There are a few options.
libaa or libcaca to convert an image into “ASCII ART.”svgalib to write to the hardware, eg, using zgv
/dev/fb0works really well.