Source code for framebuffer demos and BB

From: Michele Andreoli (
Date: Tue Nov 12 2002 - 16:21:38 CET

At request from an user, I also released, in the same directory:


the archives fbppm.tgz, j2.tgz and bb.tgz.

They are *only* demos and coding is careless.


Usage:  j2 file.jpg rgb|ppm|ppm6 
Convert jpeg files in the format rgb or PPM. The PPM6 (the rawbits PPM)
is used as input for fbppm.
The binary compile well also in libc5 and do not requires libjeg in
order to run.
It writes on the stdout.
		# j2 file.jpg | fbppm -s 2 -
The command do not use external libraries. Every is managed
internally, with zero-order performance : rustic color palette, rustic clipping,
rustic sprites.
So, do not expect fluid image
movements :-)
bppm, Display (rawbits) PPM on Linux framebuffer (C) 2002 M. Andreoli
Usage: fbppm [opts] ppmfile|-
         -x offx -y offy (XY offsets, up-left corner)
         -c (clear the framebuffer, at the end)
         -r (refresh mode)
         -f (fullscreen)
         -w [secs]; wait before exit; -w -1 means until keypressed
         -s [integer factor] (scale)
         -b (blink demo)
         -d velocity|0 (diagonal demo)
         -B velocity|0 (bouncing demo)
	 -t timeout (screen saver mode)
This command is able to show a PPM on the framebuffer console; it can
scale the images and can move the image on the screen like a bouncing ball,
Used in this way:
	# fbppm -c -t 120 file.ppm
it acts as screensaver: the image file.ppm appears flying around, if
you didn't use the keyboard for 120 sec.
fbppm uses system call like: alarm() and fork().
The C code is simple and commented.
This is the result of my reading about framebuffer graphics in Linux.
Thanks to fbv, fbi and other packages Authors for let me explore
their code :-)
Hope this useful for someone else. 
"Physics is like sex: it may give some practical
results, but that's not why we do it"  (Richard Feynman)
To unsubscribe, e-mail:
For additional commands, e-mail:

This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:23 CET