fbgrab(1)

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 screenshots 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 FRAMEBUFFER 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 framebuffer in pixels, optional when reading from device.

-i interlacing
    turns off interlacing. If you do not want ADAM7 interlacing, you should use the -i option.

-l line length, a.k.a. stride.
    the length in pixels between the start of each row in the framebuffer, which might be larger or equal to width. Optional when reading from device.

-s seconds
    specifies how many seconds to wait before grabbing. fbshot 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.

-v verbose
    be verbose

-w width
    the width of the frambeuffer in pixels, optional when reading from device.

-z compression level
    set png compression level 0 (fast) to 9 (best).

TODO
* Low-end bit depths, eg 1, 2, 4 & 8 bits.

* 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.

EXAMPLES

fbgrab fb.png

will take a framebuffer snapshot, or if you don't have fbgrab at your machine, you can do

cp /dev/fb0 framebuffer.dump

and then

fbgrab -w 1024 -h 768 -l 2048 -b 16 -f framebuffer.dump fb.png

to convert it to a picture.

AUTHOR
Written by Gunnar Monell <gunnar.monell@gmail.com>. Basically a rewrite of fbshot by Stephan Beyer <fbshot@s-beyer.de>

COPYRIGHT (C)

(C) 2002-2020 Gunnar Monell <gunnar.monell@gmail.com>

(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.