[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 8-bit vs. 24-bit color on Windows



Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes:

> When using IDL under Windows with a 24 bit display setting, the only way
> around this problem is to re-display your graphic after changing the
> color table. That's why David's XCOLORS program
> (http://www.dfanning.com/programs/xcolors.pro) includes a keyword which
> enables you to notify an external event handler that the color table has
> changed.

Note that XLOADCT now has a similar capability to call
an IDL procedure and pass it some "data" when the color
tables change. (Someone at RSI must *certainly* be
reading this newsgroup! :-)

I still like the "event" notification method, because I
think it is more general, but I did have some problems with
it last week when I taught a class on Macintosh computers.
We had to switch to the XLOADCT "procedure" notification
method to get our programs to work.

The problem seems to be that the Macintosh OS doesn't have
a way to actually "send" an event to another widget. I'm
guessing (I haven't heard a definitive answer from RSI yet)
that the "send event" functionality is hacked with a timer
event call, because my XCOLORS program acts as though it is
sending event after event after event. It is as though the
next timer event goes off before the first event is actually
processed. In any case, I get into a constant event notification 
loop until I kill XCOLORS.

But after you get the hang of *somehow* notifying your programs
when colors change I guarantee you will NEVER go back to
8-bit color. There are just far too many advantages to
24-bit color. Why, I predict the whole world will be using
24-bit color soon. :-)

> BTW I've noticed image display problems (especially with grey scale
> images) under Windows when using a 16 bit display setting. The problems
> do not appear in 8 bit or 24 bit display modes (which are the modes
> supported by IDL).

I've never noticed this and I used to run in 16-bit colors
all of the time before I splurged on more memory for my
graphics driver. Although not officially supported, the
only problem I've ever had with 16-bit color is a funny TVRD
thing where you have to switch the R and B vectors of the
color table. I'm not sure that is even still necessary.

Cheers,

David

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155