9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] how to create (convert) face?
@ 2002-04-08 17:43 rob pike, esq.
  2002-04-11 15:19 ` Axel Belinfante
  0 siblings, 1 reply; 9+ messages in thread
From: rob pike, esq. @ 2002-04-08 17:43 UTC (permalink / raw)
  To: 9fans

I don't know why gif -c produced a 16-bit image, but iconv will handle
the conversion.  If it's a greyscale image, use iconv -c k4 to get a
4-bit image.  If it's color, use iconv -c m8 to get an 8-bit
colormapped image.

-rob



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] how to create (convert) face?
  2002-04-08 17:43 [9fans] how to create (convert) face? rob pike, esq.
@ 2002-04-11 15:19 ` Axel Belinfante
  2002-04-12 12:05   ` [9fans] face Axel Belinfante
  0 siblings, 1 reply; 9+ messages in thread
From: Axel Belinfante @ 2002-04-11 15:19 UTC (permalink / raw)
  To: 9fans

> I don't know why gif -c produced a 16-bit image, but iconv will handle
> the conversion.  If it's a greyscale image, use iconv -c k4 to get a
> 4-bit image.  If it's color, use iconv -c m8 to get an 8-bit
> colormapped image.

Reason: the image contains a 'transparency' index that is converted
to an alpha channel (this is documented in gif(1)).
The image produced starts with: m8a8 0 0 48 48 .
I think the real info is, in my case here, in the transparency index --
the image itself is just completely black, which confused me when I
extracted that part using iconv -c m8.
 iconv -c a8   seems to give (sort of) the result I'm after.

(and again, I'm posting just before leaving for home --
 more (the face) tomorrow -- sorry.)

Axel.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [9fans] face
  2002-04-11 15:19 ` Axel Belinfante
@ 2002-04-12 12:05   ` Axel Belinfante
  0 siblings, 0 replies; 9+ messages in thread
From: Axel Belinfante @ 2002-04-12 12:05 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

I finally just used the xbm2ikon script to
produce the attached face file, that sort-of
resembles how I looked when I made some of
our local faces (I'm sorry, same low resolution
as in the X-Face header line).
(.... Nov 25  1991 face.xbm)

Axel.

[-- Attachment #2.1: Type: text/plain, Size: 327 bytes --]

The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: text/plain ; name="face.ikon"; charset=us-ascii
	Content-Description: face.ikon
	Content-Disposition: attachment; filename="face.ikon"

[-- Attachment #2.2: face.ikon.suspect --]
[-- Type: application/octet-stream, Size: 1056 bytes --]

0x0000,0x0000,0x0000
0x0000,0x0000,0x0000
0x0000,0x0000,0x0000
0x0000,0x0000,0x0000
0x0000,0x0160,0x0000
0x0000,0x3ffe,0x0000
0x0000,0xfffa,0x8000
0x0003,0x5fff,0x4000
0x000e,0xfddd,0x5000
0x000f,0xff7f,0xe000
0x002e,0xfffe,0xe800
0x005d,0x7fff,0xb800
0x00e1,0x7eff,0xfc00
0x0168,0x2fbf,0xff00
0x03c0,0x9bff,0xfe00
0x01d0,0x05bf,0xff80
0x0380,0x22fe,0xdf80
0x02d0,0x015f,0xffc0
0x0380,0x0057,0xff80
0x03c0,0x0013,0xffc0
0x07c0,0x0009,0xff80
0x07c8,0x0095,0xffc0
0x07c0,0x0003,0xff80
0x07c8,0x040a,0xffc0
0x07d6,0xa177,0xdfe0
0x03ef,0xfafd,0xfff0
0x01cb,0xe1ff,0xafc0
0x02d7,0xf54a,0xaf80
0x00c8,0x0114,0x5f00
0x0042,0x8109,0x2f80
0x0020,0x0240,0x5ec0
0x0040,0x0081,0x1e80
0x0000,0x4282,0x7b00
0x0000,0x0050,0xaf80
0x0010,0x13a4,0x5d00
0x0000,0x0ec2,0x9e00
0x0010,0x53e9,0x6e80
0x0000,0x5d7d,0x9780
0x0009,0xd9dd,0x6f00
0x0000,0x56b6,0x9700
0x0002,0x8145,0xa800
0x0000,0xafd7,0x5600
0x0000,0xd7ef,0xef00
0x0000,0xabbe,0xd600
0x0000,0xdbff,0xae00
0x0000,0x2fff,0xd540
0x0000,0x3ffd,0xb400
0x0000,0x0feb,0xd420

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] how to create (convert) face?
@ 2002-04-08 17:50 Sape Mullender
  0 siblings, 0 replies; 9+ messages in thread
From: Sape Mullender @ 2002-04-08 17:50 UTC (permalink / raw)
  To: 9fans

> Anyway, thanks for the help so far, (it's time to call it a day),
> Axel.

When you're done, you'll mail me your face, naturally ...



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] how to create (convert) face?
  2002-04-08 17:13 Russ Cox
@ 2002-04-08 17:39 ` Axel Belinfante
  0 siblings, 0 replies; 9+ messages in thread
From: Axel Belinfante @ 2002-04-08 17:39 UTC (permalink / raw)
  To: 9fans

> If you have a big image and want to trim it down to 48x48,
> the C program at http://www.eecs.harvard.edu/~rsc/mug.c
> might be useful.

I have a 48x48 image (part of this message in the X-Face line),
in several formats (gif, xbm, pbm) and am trying to get it into
a form in which e.g. tweak can deal with it.
(Ideally(?), of course, the face(6) 'historical' format :-)
Somehow I seem to be missing the right trick - for formats like
gif, pbm, xbm, tweak says that it cannot read it.
After conversion to 'native' image format using (ITIR)
  'gif -9ck <face.gif > face.img'
tweak complains that it cannot deal with the bit depth (16 > 8).

Looking at the man pages for the suggested commands (thanks!)
I have the impression that iconv should be able to do the trick,
but I'm not so familiar with the 'chandesc' concept so I seem to
overlook the right incantation ...

Anyway, thanks for the help so far, (it's time to call it a day),
Axel.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] how to create (convert) face?
@ 2002-04-08 17:13 Russ Cox
  2002-04-08 17:39 ` Axel Belinfante
  0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2002-04-08 17:13 UTC (permalink / raw)
  To: 9fans

If you have a big image and want to trim it down to 48x48,
the C program at http://www.eecs.harvard.edu/~rsc/mug.c
might be useful.

Russ



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [9fans] how to create (convert) face?
@ 2002-04-08 17:08 rob pike, esq.
  0 siblings, 0 replies; 9+ messages in thread
From: rob pike, esq. @ 2002-04-08 17:08 UTC (permalink / raw)
  To: 9fans

Too fast on the reply.  First you need gif (see jpg(1)) to convert the GIF to a
Plan 9 image.

-rob



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] how to create (convert) face?
@ 2002-04-08 17:07 rob pike, esq.
  0 siblings, 0 replies; 9+ messages in thread
From: rob pike, esq. @ 2002-04-08 17:07 UTC (permalink / raw)
  To: 9fans

> Probably a FAQ:
> how do I create a face file in plan 9, from (e.g.) a gif or xbm?
> (while browsing the man pages I did find the format definition (face(6)),
>  but not (or overlooked) how to create one given an existing image file...)

The faces program can handle a variety of Plan 9 formats. If you have
a GIF, convert it to a Plan 9 image using iconv(1).

-rob



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [9fans] how to create (convert) face?
@ 2002-04-08 16:58 Axel Belinfante
  0 siblings, 0 replies; 9+ messages in thread
From: Axel Belinfante @ 2002-04-08 16:58 UTC (permalink / raw)
  To: 9fans

Probably a FAQ:
how do I create a face file in plan 9, from (e.g.) a gif or xbm?
(while browsing the man pages I did find the format definition (face(6)),
 but not (or overlooked) how to create one given an existing image file...)

Thanks,
Axel - who has (sort-of) set up printing, and wants to see his face! :-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-04-12 12:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 17:43 [9fans] how to create (convert) face? rob pike, esq.
2002-04-11 15:19 ` Axel Belinfante
2002-04-12 12:05   ` [9fans] face Axel Belinfante
  -- strict thread matches above, loose matches on Subject: below --
2002-04-08 17:50 [9fans] how to create (convert) face? Sape Mullender
2002-04-08 17:13 Russ Cox
2002-04-08 17:39 ` Axel Belinfante
2002-04-08 17:08 rob pike, esq.
2002-04-08 17:07 rob pike, esq.
2002-04-08 16:58 Axel Belinfante

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).