[comp.org.usenix] want USENIX facesaver to PBM converter

davem@eta.unix.ETA.COM (Dave Marquardt) (04/07/89)

UUNET now has the USENIX FaceSaver database of faces available, and they also
have a program available to print the faces on a Postscript device.  The
pictures print very nicely on my Postscript printer, but I'd like a way to
convert them to other formats, like X11 bitmaps and Sun icon and raster
files.

So, does anyone have a program to convert the FaceServer faces, which are in an
8-bit grayscale format, to a 1-bit bitmap format, like PBM, Sun icon, or X11
bitmap files?  Please respond by mail.  If there's much interest, I'll
summarize to the net.

	Dave

avolio@decuac.dec.com (Frederick M. Avolio) (04/08/89)

xface was just recently posted to comp.sources.c.  It'll do the trick.

davem@eta.unix.ETA.COM (Dave Marquardt) (04/10/89)

In article <4241@eta.unix.ETA.COM> davem@eta.unix.ETA.COM (Dave Marquardt) writes:
>UUNET now has the USENIX FaceSaver database of faces available, and they also
>have a program available to print the faces on a Postscript device.  The
>pictures print very nicely on my Postscript printer, but I'd like a way to
>convert them to other formats, like X11 bitmaps and Sun icon and raster
>files.
>
>So, does anyone have a program to convert the FaceServer faces, which are in an
>8-bit grayscale format, to a 1-bit bitmap format, like PBM, Sun icon, or X11
>bitmap files?  Please respond by mail.  If there's much interest, I'll
>summarize to the net.

I got many responses on this, about half of them wanting further information
about getting the faces from UUNET and wanting a summary on USENET.  So, here's
some information.

To get information on getting faces from UUNET via e-mail, send a mail message 
to faceserver@uunet.uu.net (or uunet!faceserver) with the subject line of 
"help".

To get the faces via anonymous FTP, ftp to uunet.uu.net and cd to the "faces"
directory.

To convert the faces to a more common format, first get the FBM and PBM
packages, then use the following programs as a basis of your own conversion
programs.  Thanks to Paul M. Aoki of UCB for these.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  saver2fbm saver2xbm hex2raw.c
# Wrapped by aoki@faerie on Thu Apr  6 20:03:10 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'saver2fbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'saver2fbm'\"
else
echo shar: Extracting \"'saver2fbm'\" \(262 characters\)
sed "s/^X//" >'saver2fbm' <<'END_OF_FILE'
X#! /bin/sh
X#
X#	Usage:	saver2fbm < file.saver > file.fbm
X#
XTMPFILE=/tmp/face.$$
XARGS=`tee $TMPFILE | egrep PicData | sed 's/PicData[^0-9]*\([0-9]*\)[^0-9]*\([0-9]*\)[^0-9]*\([0-9]*\)/-w\1 -h\2/'`
Xsed -e '1,/^$/d' $TMPFILE | hex2raw | raw2fbm $ARGS
Xrm -f $TMPFILE
END_OF_FILE
if test 262 -ne `wc -c <'saver2fbm'`; then
    echo shar: \"'saver2fbm'\" unpacked with wrong size!
fi
chmod +x 'saver2fbm'
# end of 'saver2fbm'
fi
if test -f 'saver2xbm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'saver2xbm'\"
else
echo shar: Extracting \"'saver2xbm'\" \(133 characters\)
sed "s/^X//" >'saver2xbm' <<'END_OF_FILE'
X#! /bin/sh
X#
X#	Usage: saver2xbm [fbhalf options] < file.saver > file.xbm
X#
Xsaver2fbm | fbnorm | fbhalf -P $* | pbmfliptb | pbmtoxbm 
END_OF_FILE
if test 133 -ne `wc -c <'saver2xbm'`; then
    echo shar: \"'saver2xbm'\" unpacked with wrong size!
fi
chmod +x 'saver2xbm'
# end of 'saver2xbm'
fi
if test -f 'hex2raw.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'hex2raw.c'\"
else
echo shar: Extracting \"'hex2raw.c'\" \(126 characters\)
sed "s/^X//" >'hex2raw.c' <<'END_OF_FILE'
X#include <stdio.h>
Xmain()
X{
X	unsigned int		val;
X
X	while (fscanf(stdin, "%2x", &val) != EOF)
X		putchar((unsigned char) val);
X}
END_OF_FILE
if test 126 -ne `wc -c <'hex2raw.c'`; then
    echo shar: \"'hex2raw.c'\" unpacked with wrong size!
fi
# end of 'hex2raw.c'
fi
echo shar: End of shell archive.
exit 0