Taking a Screen Shot of an Embedded Linux Framebuffer

waffleman picture waffleman · Oct 29, 2009 · Viewed 12.6k times · Source

I'm running Embedded Linux on an evaluation kit (Zoom OMAP35x Torpedo Development Kit). The board has an LCD and I would like to be able to take screen shots convert them into a gif or png. I can get the raw data by doing the following: "cp /dev/fb0 screen.raw", but I am stumped on how to convert the image into a gif or png format.

I played around with convert from ImageMagick (example: "convert -depth 8 -size 240x320 rgb:./screen.raw -swap 0,2 -separate -combine screen.png"), but have been unable to get an image that looks right.

Does anyone know of any other tools that I could try out? Or does anyone have tips for using ImageMagick?

Answer

Anders Holmberg picture Anders Holmberg · Dec 8, 2009

Take a look at fbgrab, an application that does just that (it saves the framebuffer content as a png).