🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #40586

Re: X-Faces

#40586
From: Mike Wright
Date: Mon, 04 May 1998 00:00
61 lines
2791 bytes
Dirk Olbertz wrote:
> 
> Howdy,
> 
> could you please point me to some technical information about the X-Faces?
Here's an excerpt from my Z-mail help on how to do an X-face:

You can attach a small picture of yourself to your outgoing mail using
the X-Face header.  If the recipient is also using Z-Mail, your face
will show up in the message-reading Window instead of the
letter-and-envelope icon.  A few other mail programs also display
X-Faces. 

To make your own X-Face, you need an image of yourself and some tools
for manipulating bitmaps.  You have to convert the picture to be
black&white and exactly 48x48 pixels in size.  Let's run through an
example assuming that you have an image in GIF format and you're using
the freely-available PBMPLUS toolkit: 

 % giftoppm face.gif | \      # convert to PPM
   ppmtopgm | \               # color to grayscale, if necessary
   pgmnorm | \                # normalize grayscale contrast
   pnmscale -xy 48 48 | \     # scale to at most 48x48
   pgmtopbm > face.pbm        # convert to PBM


At this point you have an Nx48 or 48xN bitmap, and you have to make it
square.  There's no simple pipeline to do this, but here's one way: 

 % pnmfile face.pbm           # look at size
 face.pbm: PBM raw, 37 by 48
 % bc
 (48 - 37) / 2                # compute x offset for paste
 5
 % pbmmake -white 48 48 | \   # make white background bitmap
   pnmpaste face.pbm 5 0 | \  # paste in the face
   pbmtoicon | \              # convert to Sun icon format
   tail +3 | \                # remove unnecessary header stuff
   compface > face.xface      # convert to X-Face


This produces a string such as: 

 ,Ds44dHMpgZWe_mQHw>6_G=nh*w!PSv@Pn"}Q4{q}~^Zwt`4_"awA


If the string is more than one line, join the lines and remove blanks.
Replace any single quotes with single double single double single
('"'"'), and then wrap that in a my_hdr command using single quotes: 

 my_hdr X-Face: ',Ds44dHMpgZWe_mQHw>6_G=nh*w!PSv@Pn"}Q4{q}~^Zwt`4_"awA'


And put it in your ~/.zmailrc! 

-- 
Mike Wright
Remove NOSPAM to reply.

Technical Details
Message-ID: <354E1A0A.167EB0E7@naic.wpafb.af.mil>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <6ihpeh$im3$1@sun579.rz.ruhr-uni-bochum.de>

Show Full Headers
Complete Article Headers
Message-ID: <354E1A0A.167EB0E7@naic.wpafb.af.mil>
Subject: Re: X-Faces
Date: Mon, 04 May 1998 00:00:00 +0000
From: Mike Wright <msw151@naic.wpafb.af.mil>
References: <6ihpeh$im3$1@sun579.rz.ruhr-uni-bochum.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 350203754
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
To: Dirk Olbertz <olbertz@do.isst.fhg.de>
Content-Type: text/plain; charset=us-ascii
Organization: Cospo
Newsgroups: news.software.readers