[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's wrong with my face?
From: |
Aphrodite |
Subject: |
Re: What's wrong with my face? |
Date: |
Sat, 15 May 2004 08:11:32 +0000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
jesse@phiwumbda.org (Jesse F. Hughes) writes:
<snip>
> Tonight I installed netpbm and now the header is being generated,
> but I can't see the image in my own posts. I'm not sure, but I
> think it's too large, despite the fact that I use the usual method
> for including it:
>
> (add-to-list 'message-required-mail-headers
> '(Face . (lambda ()
> (gnus-face-from-file
> (expand-file-name
> "~/pics/MickeyFace.jpg")))))
>
> (add-to-list 'message-required-news-headers
> '(Face . (lambda ()
> (gnus-face-from-file
> (expand-file-name
> "~/pics/MickeyFace.jpg")))))
>
> The file is a bit complicated, I guess, and I see the following
> messages when I send a post.
>
> Length 802; trying quant 8
> Length 892; trying quant 10
> Length 951; trying quant 12
> Length 1008; trying quant 14
>
> It appears that quant 8 gets the size down sufficiently, but I just
> don't know. Can anyone help me diagnose the problem? Thanks much.
I use the following to insert my face and x-face:
(setq message-default-headers
(concat
(with-temp-buffer
(insert "Face: ")
(insert-file-contents "~/.face13")
(buffer-string))
(with-temp-buffer
(insert "\n")
(buffer-string))
(with-temp-buffer
(insert "X-No-Archive: yes\n")
(buffer-string))
(with-temp-buffer
(insert "X-Face: ")
(insert-file-contents "~/.xface13")
(buffer-string))
))
~/.face13 was created by doing the following:
1.) taking a 48x48 *.jpg image and converting it to a *.png file.
2.) making sure it contains 4-12 colors, but the face header seems to
choke if you try and use too many colors. Choose more colors if
your image has more or less the same colors, and choose less colors
if you're trying to use an image with many different colors. save
the *.png file.
3.) M-x find-file-literally *.png
4.) C-x h
5.) M-x base64-encode-region
6.) C-x s
7.) use the above snippet of elisp
8.) send an email to yourself... gnus will give you a message saying
something about the continuation of the header not being right and
if you would like to automatically fix it. type in 'yes' and it
will send to your local email address. it will not fix itself if
you try and send to a newsgroup. i needed to send an email to myself
to have gnus ask me if i wanted to fix the continuation of the
file. you know your x-face is too big if the body of the message
you send yourself contains x-face dribble.
9.) open up your email and if you see the face header the way you
want it type 't' to expand headers.
10.) copy the x-face header that is in the email you sent yourself
and then copy it into a blank file as that is an x-face with fixed
line continuation.
11.) enjoy
the x-face i have in this post is 16 (if i recall correctly) colors
and worked because 99% of the picture is the same color... remember,
the more colors in the image the less colors you want to give your
x-face, otherwise, it will become too large.
--
Linux 2.6.2-rc1-mm3 #1 Wed Jan 28 02:04:13 UTC 2004 i686
07:43:19 up 99 days, 19:26, 5 users, load average: 0.24, 0.11, 0.02