9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: okamoto@granite.cias.osakafu-u.ac.jp
To: 9fans@cse.psu.edu
Subject: Re: [9fans] colormap
Date: Thu,  1 Mar 2001 18:35:41 +0900	[thread overview]
Message-ID: <20010301093616.0850E199EA@mail.cse.psu.edu> (raw)

>Your m8 image shows colors on the true-color display because
>you've lied about the channel format, saying it's color.

Yes, we lied the Plan 9 kernel.  However, isn't it posssible to use another
colormap to change colormap to rgb by cmap2rgb(), which assumes only
rgbv colormap?

Without this lie, we have no chance to see 256 greyscale images on
8 bit display...   I found some codes in /sys/src/libdraw/rgb.c assuming 
only 16 shades of greyscale, which made us disappointed. 

Our local "lie and broken promise" method is as follows:  ^_^

To check what display depth we are in, and
(1) if we are on 8 bit display, make m8 'greyscale' data, and change colormap
to one having 256 grey shades, such as /lib/cmap/c7291.56.
(2) if we are on truecolor display, make k8 'greyscale' data.

We tried (r8g8b8) with same three bytes data, but it's just waste of memory.  :-)

Kenji



             reply	other threads:[~2001-03-01  9:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01  9:35 okamoto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-03-01  8:41 Russ Cox
2001-03-01  8:15 okamoto
2001-03-01  1:52 okamoto
2001-02-28  6:52 okamoto
2001-02-28  6:55 ` Scott Schwartz
2001-02-28  6:26 Russ Cox
2001-02-28  6:02 okamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010301093616.0850E199EA@mail.cse.psu.edu \
    --to=okamoto@granite.cias.osakafu-u.ac.jp \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).