* compface
@ 2002-01-15 22:42 Simon Josefsson
2002-01-16 2:17 ` compface Karl Kleinpaste
2002-01-16 6:56 ` compface Mark Trettin
0 siblings, 2 replies; 8+ messages in thread
From: Simon Josefsson @ 2002-01-15 22:42 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
The compface's I have tried (compface RPMs and compface from
freshmeat) doesn't seem to work, or maybe the pbmtoxbm program I
have doesn't work. Compface seem to want 48 lines each containing
of 16 bit C integers, but pbmtoxbm outputs a C character array.
pbmtox10bm (X10 bitmap format) outputs 16 bit integers but not
three per line. If I manually edit it to make compface happy it
outputs the X-Face in this message, which looks corrupt. Any
ideas?
Using standard formats would be nice.. Converting the image below
to a 128x128 PNG takes up 11 base64 lines, I'm sure it could be
reduced further if someone tried.
(Or perhaps someone could convert the attached GIF for me. :-) But
I want to make more X-Face's anyway...)
[-- Attachment #2: don5.png --]
[-- Type: image/png, Size: 2126 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compface
2002-01-15 22:42 compface Simon Josefsson
@ 2002-01-16 2:17 ` Karl Kleinpaste
2002-01-16 2:39 ` compface Lars Magne Ingebrigtsen
2002-01-16 2:54 ` compface John H. Palmieri
2002-01-16 6:56 ` compface Mark Trettin
1 sibling, 2 replies; 8+ messages in thread
From: Karl Kleinpaste @ 2002-01-16 2:17 UTC (permalink / raw)
Simon Josefsson <jas@extundo.com> writes:
> Any ideas?
See X-Face above. :-)
My compface simply doesn't like the leading 2 lines of C comment from
the icon format stage. I strip that out and compface is happy as can
be. I used xv(1) to size it down to 48x48 (with `S', followed by
smoothing it with `s') and then sicced this pipeline on it:
xbmtopbm < don5.xbm | pbmtoicon | tail +3 | compface > don5.xface
I'm still lost, however, on how one would create the high-niftitude
multi-plane X-Face-<digit>.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compface
2002-01-16 2:17 ` compface Karl Kleinpaste
@ 2002-01-16 2:39 ` Lars Magne Ingebrigtsen
2002-01-16 2:54 ` compface John H. Palmieri
1 sibling, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-16 2:39 UTC (permalink / raw)
Karl Kleinpaste <karl@charcoal.com> writes:
> My compface simply doesn't like the leading 2 lines of C comment from
> the icon format stage. I strip that out and compface is happy as can
> be.
compface expects something that it calls "ikon" format files, which is
basically the same as "icon", except that it lacks that comment.
Weird, but true.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compface
2002-01-16 2:17 ` compface Karl Kleinpaste
2002-01-16 2:39 ` compface Lars Magne Ingebrigtsen
@ 2002-01-16 2:54 ` John H. Palmieri
2002-01-16 4:03 ` compface Karl Kleinpaste
1 sibling, 1 reply; 8+ messages in thread
From: John H. Palmieri @ 2002-01-16 2:54 UTC (permalink / raw)
Karl Kleinpaste <karl@charcoal.com> writes:
> I'm still lost, however, on how one would create the high-niftitude
> multi-plane X-Face-<digit>.
Check the "X-Face and depth" thread. I posted one version (in message
<s5tsn9gzgoj.fsf@goedel1.math.washington.edu>) of the function
'gnus-convert-image-to-gray-x-face' that doesn't use xbmtoikon.
--
J. H. Palmieri
Dept of Mathematics, Box 354350 mailto:palmieri@math.washington.edu
University of Washington http://www.math.washington.edu/~palmieri/
Seattle, WA 98195-4350
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compface
2002-01-16 2:54 ` compface John H. Palmieri
@ 2002-01-16 4:03 ` Karl Kleinpaste
2002-01-16 5:52 ` compface Bill White
0 siblings, 1 reply; 8+ messages in thread
From: Karl Kleinpaste @ 2002-01-16 4:03 UTC (permalink / raw)
palmieri@math.washington.edu (John H. Palmieri) writes:
> Check the "X-Face and depth" thread. I posted one version (in message
> <s5tsn9gzgoj.fsf@goedel1.math.washington.edu>) of the function
> 'gnus-convert-image-to-gray-x-face' that doesn't use xbmtoikon.
OK, I tried both the convert function that's currently in gnus-fun.el,
as of CVS half an hour ago, as well as the testing.el that was in a
previous message of yours. (They may be the same code -- I didn't
compare them closely.)
Both functions upchuck thus:
Signaling: (wrong-type-argument integer-char-or-marker-p nil)
logand(nil 1)
(zerop (logand bits mask))
(if (zerop (logand bits mask)) "0 " "1 ")
(insert (if (zerop ...) "0 " "1 "))
(while --dolist-temp--76458 (setq bits (car --dolist-temp--76458)) (insert (if ... "0 " "1 ")) (setq --dolist-temp--76458 (cdr --dolist-temp--76458)))
(let ((--dolist-temp--76458 bits-list) bits) (while --dolist-temp--76458 (setq bits ...) (insert ...) (setq --dolist-temp--76458 ...)) nil)
[etc]
This results from invoking:
(gnus-convert-image-to-gray-x-face "/usr/local/faces/users/com/charcoal/karl/face.gif" 3)
It's the same stack trace as reported by Raymond Scholz last weekend.
I see Lars asked Raymond just a while ago whether he was still seeing
this. I don't know whether Raymond sees it, but I surely do.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compface
2002-01-16 4:03 ` compface Karl Kleinpaste
@ 2002-01-16 5:52 ` Bill White
0 siblings, 0 replies; 8+ messages in thread
From: Bill White @ 2002-01-16 5:52 UTC (permalink / raw)
Cc: ding
On Tue Jan 15 2002 at 22:03, Karl Kleinpaste <karl@charcoal.com> said:
> Both functions upchuck thus:
>
> Signaling: (wrong-type-argument integer-char-or-marker-p nil)
> logand(nil 1)
> (zerop (logand bits mask))
> (if (zerop (logand bits mask)) "0 " "1 ")
> (insert (if (zerop ...) "0 " "1 "))
> (while --dolist-temp--76458 (setq bits (car --dolist-temp--76458)) (insert (if ... "0 " "1 ")) (setq --dolist-temp--76458 (cdr --dolist-temp--76458)))
> (let ((--dolist-temp--76458 bits-list) bits) (while --dolist-temp--76458 (setq bits ...) (insert ...) (setq --dolist-temp--76458 ...)) nil)
> [etc]
Same here. Oort Gnus v0.05 (cvs this evening), GNU Emacs 21.1.50.3
(i586-pc-linux-gnu, X toolkit) of 2002-01-08 on g.wolfram.com
Cheers -
bw
--
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compface
2002-01-15 22:42 compface Simon Josefsson
2002-01-16 2:17 ` compface Karl Kleinpaste
@ 2002-01-16 6:56 ` Mark Trettin
2002-01-16 12:37 ` compface Simon Josefsson
1 sibling, 1 reply; 8+ messages in thread
From: Mark Trettin @ 2002-01-16 6:56 UTC (permalink / raw)
* On: Tue, 15 Jan 2002 23:42:56 +0100 Simon Josefsson writes:
> The compface's I have tried (compface RPMs and compface from freshmeat)
> doesn't seem to work, or maybe the pbmtoxbm program I have doesn't work.
> Compface seem to want 48 lines each containing of 16 bit C integers, but
> pbmtoxbm outputs a C character array. pbmtox10bm (X10 bitmap format)
> outputs 16 bit integers but not three per line. If I manually edit it
> to make compface happy it outputs the X-Face in this message, which
> looks corrupt. Any ideas?
Maybe the following Perl-Skript works for you too -- it is part of the
SuSi 7.2 compface-Package:
--8<----------------------- schnipp ------------------------>8---
#!/usr/bin/perl
#
# xbm2xface -- convert a 48x48 xbm file to an xface header
#
# Stig@hackvan.com
sub reverse_byte {
local($byte) = @_;
local($n, $b);
for ( $b= $n= 0; $b<8; ++$b) {
$n |= (($byte & 1) << (7-$b));
$byte >>= 1;
}
return($n);
}
#printf "0x%02x\n", &reverse_byte(0xF0);
<>;
m/^#define \w+_width (\d+)/ && ($width=$1);
<>;
m/^#define \w+_height (\d+)/ && ($height=$1);
<>;
m/^static.* = \{/ && (( $width == 48 && $height == 48 )
|| die "xfaces are 48x48" );
open(CF,"|compface");
while (<>) {
$st="";
while (s/(0x..)(,|\};)\s*//) {
$st .= sprintf("0x%02x, ", &reverse_byte(eval($1)));
}
$_=$st;
s/(0x..), 0x(..)/\1\2/g;
s/\s*(0x...., 0x...., 0x....)(,|\};)\s/\1,\n/g;
print CF $_;
}
close (CF);
--8<----------------------- schnapp ------------------------>8---
With that the following should work (on-the-fly-convertion):
(setq gnus-convert-image-to-x-face-command "giftopnm %s | ppmnorm 2>/dev/null | pnmscale 2>/dev/null -width 48 -height 48 | ppmtopgm | pgmtopbm | pbmtoxbm | xbm2xface.pl")
[...]
HTH
Mark
--
Mark Trettin · Aachen · Germany · Where is Aachen? --> N: 50°46' E: 06°05'
BOFH excuse #53:
Little hamster in running wheel had coronary; waiting for replacement
to be Fedexed from Wyoming
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: compface
2002-01-16 6:56 ` compface Mark Trettin
@ 2002-01-16 12:37 ` Simon Josefsson
0 siblings, 0 replies; 8+ messages in thread
From: Simon Josefsson @ 2002-01-16 12:37 UTC (permalink / raw)
Cc: ding
On Wed, 16 Jan 2002, Mark Trettin wrote:
> Maybe the following Perl-Skript works for you too -- it is part of the
> SuSi 7.2 compface-Package:
Thanks. I wonder why the image conversion stuff isn't done in elisp. Or
at least the required utilities should be in contrib/ or something. Is the
image support flexible enough to convert between formats? Adding a elisp
implementation of X-Face support to the image engine should be possible.
(But probably the image stuff doesn't support this.) O well.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-01-16 12:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-15 22:42 compface Simon Josefsson
2002-01-16 2:17 ` compface Karl Kleinpaste
2002-01-16 2:39 ` compface Lars Magne Ingebrigtsen
2002-01-16 2:54 ` compface John H. Palmieri
2002-01-16 4:03 ` compface Karl Kleinpaste
2002-01-16 5:52 ` compface Bill White
2002-01-16 6:56 ` compface Mark Trettin
2002-01-16 12:37 ` compface Simon Josefsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).