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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: unexpected colors [message #20187] Tue, 23 May 2000 00:00
promashkin is currently offline  promashkin
Messages: 169
Registered: December 1999
Senior Member
David Fanning wrote:
> 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. :-)

Gee, I'll say. I just got email from Egghead.com, they have ATI video
card with 64 Mb or SDRAM on it, dual 200 MHz dedicated processors. Not
to mention Nvidia GeForce 2 that has a 333 MHz bus clock and draws 1.6
billion pixels and 25 million triangles per second with its 3D
processing unit. Surely, they both come with OpenGL, DirectX 7 and
Glide, so your gaming experience is just as pleasing as the IDL one :-)

Cheers,
Pavel
Re: unexpected colors [message #20204 is a reply to message #20187] Mon, 22 May 2000 00:00 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
David Fanning wrote:

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

Dang! Well, it's not the end of the world. I can always change the second
direct graphics drawing to object graphics.
I tried the code at home tonight on a 24 bit display. Sure enough, I'm back
to a dull but expected gray scale.
I didn't realize that the object graphics used the color lookup table when on
an 8 bit display system...
I had assumed that when I told the graphic axis object to be color [255,0,0]
that meant just that.
Of course, I hadn't really thought of it at all, which is why my code is
generally erorr fre.

Thanks for the info.

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

Better the design table than the dog house!

Ben






--
Ben Tupper
Pemaquid River Company
248 Lower Round Pond Road
POB 106
Bristol, ME 04539

Tel: (207) 563-1048
Email: PemaquidRiver@tidewater.net
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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 15:54:16 PDT 2025

Total time taken to generate the page: 0.00592 seconds