When using Linux, you can use the
framebuffer[
^].
To show an image using the framebuffer:
- Open the framebuffer device (/dev/fbX)
- Get the device information using
ioctl
calls with FBIOGET_FSCREENINFO
and FBIOGET_VSCREENINFO
- If necessary convert the image to the color depth of the framebuffer device (e.g. using the avconv utility)
- Optionally scale the image
- Map the device to memory using
mmap
- Copy the image data to the memory returned by
mmap
- Close the mapped memory
- Close the device
If you need the image to be shown together with text, you should also draw the text using the framebuffer. Using normal console text output might overwrite parts of the image and may scroll the image out of view.
As library I would suggest Qt which supports multiple output methods including framebuffers.