Xref: utzoo comp.org.usenix:805 comp.graphics:5213 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!xanth!nic.MR.NET!eta!davem From: davem@eta.unix.ETA.COM (Dave Marquardt) Newsgroups: comp.org.usenix,comp.graphics Subject: Re: want USENIX facesaver to PBM converter Message-ID: <4284@eta.unix.ETA.COM> Date: 10 Apr 89 15:40:59 GMT References: <4241@eta.unix.ETA.COM> Reply-To: davem@eta.unix.eta.com (Dave Marquardt) Followup-To: comp.org.usenix Distribution: na Organization: ETA Systems, Inc., St Paul, MN Lines: 95 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 '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 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