Re: Window (tv,tvscl) color problem, sometimes [message #13705] |
Fri, 04 December 1998 00:00 |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
mole6e23@hotmail.com (Todd) writes:
> Hi all!
> We are running IDL 5.1 on Digital UNIX and accessing it from different
> platforms with various X Servers (MacX on the Mac, Exceed on Windows
> (NT/Alpha)), and have run across an odd problem with color.
> Off of the Mac and off of the host itself, everything works fine...color
> is great, yadda yadda yadda. Off of the Alphas running Exceed, using tv or
> tvscl to display an image does not display color (although using plot with
> the color keyword DOES display color). Fine, I though, just a problem with
> Exceed, or with how Exceed is set up. Well, it turns out that if we run
> "demo" first, and THEN our program, everything works fine and color comes
> out nicely. Running demo does give us an error message with text similar
> to "Unsupported XWindows Visual (class: Psuedo_color, depth=8)" and
> "Substituting default visual (class: true_color)" (I did this from memory,
> so if it's not entirely accurate, don't worry. =) So we tried using
> device, true_color=24
> and that didn't work...still no color using tvscl or tv. So at this point,
> I'm rather stumped. I was hoping someone in this group (since you've all
> been so helpful to other lost souls in the past) might have a suggestion
> or even better, an answer.
Todd:
The source code for demo.pro contains the following lines:
if (((!D.Name EQ 'X') OR (!D.NAME EQ 'MAC')) AND $
(!D.N_Colors GE 256L)) then DEVICE, Pseudo_Color=8
DEVICE, Decomposed=0, Bypass_Translation=0
It sounds like the first of these statements is causing an error on Windows,
placing you temporarily into true color mode. However, the second statement
puts you back into false color mode, which is what you want. For
cross-platform capability, you may want to add both of these to your IDL
startup file.
Bill Thompson
|
|
|