FBGrab
From ArmadeusWiki
Contents
Introduction
FBGrab is a framebuffer screenshot program, capturing the Linux framebuffer and converting it to a png-picture.
Installation
[host] $ make menuconfig
- then choose fbgrab in:
Usage
- Just do:
# fbgrab toto.png
- Here is the full man page:
NAME fbgrab - takes screenshots using the framebuffer device SYNOPSIS fbgrab [options] filename DESCRIPTION fbgrab reads the framebuffer device (/dev/fb*) or a dump thereof and saves a PNG image file. You can use it for making screen‐ shots of of virtually any application, from traditional test applications to your X-windows desktop, as well as framebuffer applications. OPTIONS -? print usage information. -b bitdepth the number of bits per pixel used, optional when reading from device. -c console specifies which console (or virtual terminal - like other people call this feature) to grab. Sometimes this changing is faster then the framebuffer is refreshed (especially when grabbing framebuffer apps). If so, you should use -C console ... This waits some time before grabbing. You can’t use -s in this case. -d device specifies which framebuffer device you want to read. If you do not use this option, it takes the value from the FRAME‐ BUFFER environment variable. If no FRAMEBUFFER environment variable is given or if its value is NULL, then DEFAULT_FB is taken. (see source code), which usually is /dev/fb0. -f filename Read from from file instead of device, requires that -w (width), -h (height) and -b (bitdepth) are specified. -h height the height of the frambeuffer in pixels, optional when reading from device. -i turns off interlacing. If you do not want ADAM7 interlacing, you should use the -i option. -s seconds specifies how many seconds to wait before grabbing. fbgrab does not lock console switching, so you can switch it while waiting, if you cannot use -c requires normally that fbgrab is run as root. -w width the width of the frambeuffer in pixels, optional when reading from device. TODO * Low-end bit depths, eg 1, 2, 4 & 8 bits. * Grab just part of framebuffer/file. * Companion program fbput that would display a picture in the frambuffer. * Better utilization of the PNG-lib, all formats are first converted to 32 bitdepth and then stored as PNG - hardly the right approach. BUGS Some framebuffer seams to store the data for one fixed resolution even if the resolution is set to something lower. In these cases the fixed size has to be specified and the picture has to be cut in a separate program afterwards. EXAMPLES fbgrab fb.png will take a framebuffer snapshot, or if you don’t have fbgrab at your machine, you can do cat /dev/fb0 > framebuffer.dump and then fbgrab -w 1024 -h 768 -b 16 -f framebuffer.dump fb.png to convert it to a picture. AUTHOR Written by Gunnar Monell <gmo@linux.nu>. Basically a rewrite of fbshot by Stephan Beyer <fbshot@s-beyer.de> COPYRIGHT (C) (C) 2002 Gunnar Monell <gmo@linux.nu> (C) 2000 Stephan Beyer <fbshot@s-beyer.de> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.