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

Home » Public Forums » archive » Re: can't change colortable in current window (linux bpp24)
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: can't change colortable in current window (linux bpp24) [message #16287 is a reply to message #16278] Fri, 16 July 1999 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Olivier ARCHER wrote:
> when i load a color table with loadct *after* opening a window, nothing
> happen. here a piece of code producing the error:
>
> device,decompose=0
> window,/free && tv,dist(400) ;; picture in B/W
> loadct,4 ;; this have no effect in the current
> window ( no error messages )
> window,/free && tv,dist(400) ;; picture in color; loadct effect...
>
> this fail on a linux rh6 , with dpyinfo saying that my X serveur is
> TrueColor, with 24 plane depth
> this work on solaris( creator 3D graphics card) , with dpyinfo saying
> that my X serveur support various combination of class/depth.

Olivier,

The behavior you describe is actually a *feature* of 24-bit TrueColor
mode in IDL. You can certainly do a lot of neat stuff in 24-bit mode, as
described David's excellent articles. A quick way around this problem in
24-bit mode is to always load the color table just before displaying the
image, e.g.

loadct, 4
tvscl, dist(256)

However if you really *want* all of your graphics displays to update
automatically any time you change the color table (using LOADCT,
XLOADCT, or TVLCT), *and* you don't mind the limitations of 8-bit
PseudoColor mode in IDL, then type the following commands just after
starting a new IDL session:

device, pseudo=8, decomposed=0, retain=2 ; select PseudoColor mode
window, /free, /pixmap ; lock this mode by opening a window
wdelete, !d.window

PseudoColor mode will then be locked in for the rest of the IDL session
(you can't change modes once you've created a graphics window). To check
that you actually got PseudoColor mode:

device, get_visual_name=mode
print, mode

If you want to change back to TrueColor mode in future IDL sessions,
replace 'pseudo=8' with 'true=24'. These commands are best placed in an
IDL startup file. Type

? startup

in IDL to find out how to use a startup file.

Cheers,
Liam.

--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D Graphics Question
Next Topic: RSI announces Noesys 2.0

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

Current Time: Wed Dec 03 01:44:36 PST 2025

Total time taken to generate the page: 0.32005 seconds