Wednesday, April 6, 2016

Framebuffer screen dumps to PNG and back

I've got a nice card with an Atmel AVR32 processor and a nice big 320x240 (monochrome!) screen. :)
I can put data on the screen from buildroot linux by writing directly to the framebuffer, /dev/fb0. However the data there is in raw format. Here is how to dump from screen. Then convert, using ffmpeg, the raw data to a PNG and then back to raw data after editing:

Get a screenshot of the framebuffer using cat /dev/fb0 > screendump.bin.