From: dpg@cs.nott.ac.uk (`Grave' Dave Gymer) Subject: Re: showpgm.c -- grey scale veiwer. -- greyscale gif veiwer! Date: 1 Jun 1992 11:26:08 GMT
In article <1992May30.032743.19079@dartvax.dartmouth.edu> platt@coos.dartmouth.edu (The Crouton Man) writes:
>i have written the following program based very heavily
>on the showpbm (bitmap format --> black and white 1 bit only)
>program by Michael Cain. it uses vgalib by frandsen@diku.dk
>(Tommy Frandsen) [ thanks MUCH ].
>[...]
I've been working on a set of three programs, one each for bitmaps,
greymaps, and pixmaps. The former uses the vgblit library (from MGR),
and the others use the vgalib. (Soon I hope to change things so that
they all use the vgalib).
The pixmap viewer is limited to pictures of however many colors you're
displaying (the mode is selectable from the command line), and pictures
can be listed as arguments or read from stdin.
I got around the problem of reading keypresses by testing fd 0 after I
loaded a picture to see if it's connected to a terminal, and if so, I close
it and open "/dev/tty". I also hacked the vgalib to use a seperated fd for
it's terminal stuff, opened from /dev/tty, so that it didn't interfere with
my code.
This stuff is starting to approach a semi-respectable state (but still has
a long way to go); if people are interested I could upload the package to
banjo.
-- _/ _____/ _/ _/ _/ _/ _/ _/ Free unix clone | dpg@Cs.Nott.AC.UK _/ _/ __/ _/ _/ _/ _/_/ for the 386/486 | `Grave' Dave Gymer _/ _/ _/_/_/ _/ _/ _/ finger torvalds@ | _/ _/ _/ __/ _/ _/ _/_/ klaava.helsinki.fi | Die! Chaos claims