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

Home » Public Forums » archive » 24 bit colors in IDL
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: 24 bit colors in IDL [message #13671 is a reply to message #13280] Thu, 19 November 1998 00:00 Go to previous message
Vapuser is currently offline  Vapuser
Messages: 63
Registered: November 1998
Member
davidf@dfanning.com (David Fanning) writes:


Dave;

I don't think this will work. On my SGI running Irix 6.5 and idl
5.1.1 just making the 'Device, Get_Visual_Name=thisName' call set's
the visual class. I issued the following statements as the first
statements after starting IDL.

IDL> device,get_visual_name=name & print,name
DirectColor
IDL> device,pseudo=8
^^^^^^^^^^^^^^^

IDL> device,get_visual_name=name & print,name
DirectColor
^^^^^^^^^^^

IDL> window
IDL> print,!d.n_colors
16777216

IDL>exit
Process idl finished


Similarly ...


IDL> device,pseudo=8
IDL> device,get_visual_name=name & print,name
PseudoColor
IDL> device,true=24
IDL> device,get_visual_name=name & print,name
PseudoColor
IDL> window
IDL> print,!d.n_colors
41
IDL> exit
Process idl finished



The help file says...

The colormap/visual class combination is chosen when IDL first
connects with the X Window server. Note that if you connect with the X
server by creating a window or

using the DEVICE keyword to the HELP procedure,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

the visual class will be set; it then cannot be changed
until IDL is restarted. If you wish to use a visual class other than
the default, be sure to set it with a call to the DEVICE procedure
before creating windows or otherwise connecting with the X Window
server.


I suspect that the same mechanism is used by
'device,get_visual_name=name' as is used in help,/device. In order to
answer the question, a connection is made to the X-server, the die is
cast, the matter is settled.

If a connection to the X-server has not been made, I would rather see
a "don't know" message returned,rather than have IDL decide on the
visual. At least that way, when some routine started up, I'd know that
I still have the option of pseudo color or true color available. This
way, just asking the question decides the answer.

>
> Andy Bristow (ajbristow@dera.gov.uk) writes:
>
>> I was just getting my head round 24-bit, having been prompted by this
>> thread. So, at Philip's suggestion I went to
>>
>> http://www.dfanning.com/tips/colors24.html
>>
>> All well and good. Sounds relatively straightforward.
>>
>> So on my SGI (IRIX 6.5.1, IDL 5.1) I tried some of the
>> suggested code (immediatley after starting IDL up):
>>
>> device,decomposed=0
>> tvlct,[[255],[255],[0]],100
>> plot,randomu(10,10),color=100
>>
>> expecting the plot to be yellow, as advertised. Except no, _I_
>> get a medium-light shade of grey!
>>
>> Any suggestions?
>
> Oh, dear. I think this is one of those TrueColor/DirectColor
> tricks that SGI engineers like to play on people. This is
> a complication that I don't *even* want to know about.
>
> Try this. Type this:
>
> Device, Get_Visual_Name=thisName
> Print, thisName
>
> If thisName is "TrueColor" change it to "DirectColor":
>
> Device, DirectColor=24
>
> If thisName is "DirectColor" change it to "TrueColor":
>
> Device, TrueColor=24
>
> Do this *before* you open any graphics windows in IDL.
> Try the code above again. Different? The same?
>
> Please let us know. :-(
>
> Cheers,
>
> David
>
> Note: A copy of this article was e-mailed to the original poster.
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Status Bar Help
Next Topic: Is the new IDL5.2 for Linux ELF-based or a.out-based?

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

Current Time: Tue Dec 02 09:01:22 PST 2025

Total time taken to generate the page: 1.12039 seconds