can I display a JPG or PNG to the framebuffer (/dev/fb*)?
Solution 1:
Have you tried Fbida?
fbida
contains fbi
, an image viewer for the framebuffer.
Link to fbi
man page - http://manpages.ubuntu.com/manpages/lucid/man1/fbi.1.html
P.S - I am not sure whether it will work in Raspbian.
Solution 2:
it might help you, detailed manual http://hacklab.cz/2012/04/22/usefulness-linux-framebuffer-virtual-console I think it has all in one place about Linux Framebuffer
Solution 3:
What format is the framebuffer image data in?
The Linux kernel 4.2 documentation https://github.com/torvalds/linux/blob/v4.2/Documentation/fb/api.txt#45 says:
Pixels are stored in memory in hardware-dependent formats. Applications need to be aware of the pixel storage format in order to write image data to the frame buffer memory in the format expected by the hardware.
Formats are described by frame buffer types and visuals. Some visuals require additional information, which are stored in the variable screen information bits_per_pixel, grayscale, red, green, blue and transp fields.
Visuals describe how color information is encoded and assembled to create macropixels. Types describe how macropixels are stored in memory. The following types and visuals are supported.
A list of visuals and types follows, but the description is not enough for me to understand the exact formats immediately.
Solution 4:
If you can install them, fbcat
will create a ppm image, and fbgrab
will create a png image.
Solution 5:
If you want to cp /dev/fb0 ~/myimage
, the image should only contain the pixels information,and the order should be right (RGB, BGR, RGBA, ARGB
...)
I want to do this too,but did not find a suitable tool, so I use python to help me pre-made the image. You can try this.