comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: unexpected colors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: unexpected colors [message #20210 is a reply to message #20204] Mon, 22 May 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ben Tupper (tupper@seadas.bigelow.org) writes:

> I'ld like to say that my code has only had 1 error in the last three
> versions, but I don't want any of you to get a hernia from giggling.
> Wow!

Hurray!


> I have a widget application with two separate draw widgets. The first
> has GRAPHICS_LEVEL =2 (object graphics), the second has
> GRAPHICS_LEVEL not set to anything (direct graphics.) I am using
> Liam's IMDISP , but I have also used David's TVIMAGE and plain old
> vanilla TV. Here's the trouble, I'm getting a beautiful image
> displayed in lovely colors... but it is supposed to be greyscale. Even
> if I call LoadCT,0 just prior to displaying the image, I get a colored
> image instead.
>
> I have narrowed down the occurance, but no the reason or the solution.

Here is your trouble, right here:

> IDL> help,/device
> Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
> Current graphics device: X
> Server: X11.0, Sun Microsystems, Inc., Release 3610
> Display Depth, Size: 8 bits, (1152,900)
> Visual Class: PseudoColor (3)

> Any suggestions?

Get a 24-bit display device. No, seriously. :-)

It is impossible to avoid this kind of color problem
when you combine direct and object graphics on an 8-bit
display. The reason is that there is only one color table
and direct and object graphics use it in two completely
different (and incompatible) ways. As soon as you get
things set up for your direct graphics window, the object
graphics window loads its own color table, and the colors
go bonkers. And since the object graphics window knows how
to protect its own colors (better believe it!), it always
changes the color table when it redraws itself, and visa
versa.

I'm afraid it's back to the design table for you, Ben, my boy.
Either that, or get the folks to cough up some cash for
a new graphics card. Sell them on the numerous advantages.
And point out that it's almost the end of the 20th century. :-)

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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: bug in sprsin() for IDL 5.3?
Next Topic: Comma seperators

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:01:58 PDT 2025

Total time taken to generate the page: 0.74854 seconds