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:50 Sape Mullender
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

* Re: [9fans] how to create (convert) face?
  2002-04-08 17:43 rob pike, esq.
@ 2002-04-11 15:19 ` Axel Belinfante
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

* 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ messages in thread

* [9fans] how to create (convert) face?
@ 2002-04-08 17:08 rob pike, esq.
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

* Re: [9fans] how to create (convert) face?
@ 2002-04-08 17:07 rob pike, esq.
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

* [9fans] how to create (convert) face?
@ 2002-04-08 16:58 Axel Belinfante
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

end of thread, other threads:[~2002-04-11 15:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 17:50 [9fans] how to create (convert) face? Sape Mullender
  -- strict thread matches above, loose matches on Subject: below --
2002-04-08 17:43 rob pike, esq.
2002-04-11 15:19 ` Axel Belinfante
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).