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

Home » Public Forums » archive » Sorry! I made a mistake.
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
Sorry! I made a mistake. [message #30375] Fri, 26 April 2002 18:04 Go to next message
Weiqun Zhang is currently offline  Weiqun Zhang
Messages: 3
Registered: April 2002
Junior Member
In the .Xdefaults file, I should put "idl.gr_visual: TrueColor" instead
of "idl.gr_visual: True". Now it works. But there is still a problem I
don't understand.
(1) Which command is correct? "device, true=24" or "device,
TrueColor=24". In David Fanning's book, it is "device, TrueColor=24".
But I got error like this,
IDL> window
IDL> device, TrueColor=24
% Keyword TRUECOLOR not allowed in call to: DEVICE
I won't get error from "device, true=24", but it doesn't work.

Weiqun Zhang wrote:

> I am using IDL5.5 on RH Linux 7.2. I have some troubles with 8-bit
> images. "help, /device" tells me the visual class is "directcolor" and
> the depth is 24 bits. After displaying an 8-bit image using either tv or
> David Fanning's tvimage, the picture is in gray scale no matter what
> color table is loaded. If I click the IDL window and hold the mose,
> nothing happens. Then if I move the mouse so that the whole window moves
> a little bit, colors appear in the IDL window correctly, but other
> non-IDl windows have some strange colors. I know that the problem may be
> solved if I change the visual class to true. Unfortunately, I cannot
> change it.
>
> I have tried two ways.
> (1)device, true=24. After typing this command, I open a new window, then
> use "help, /device" to check it, it is still running direcrcolor.
> (2)I put "idl.gr_visual: True" and "idl.gr_depth: 24" in my .Xdefaults.
> Then Below message appears when I try to open a new window.
> IDL> window
> % WINDOW: X Windows resource "idl.gr_visual" has invalid value: True.
>
> Please help me! Thanks a lot!
>
> Belows are some information which might be helpful.
>
> IDL> window
> IDL> help,/device
> Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
> Current graphics device: X
> Server: X11.0, The XFree86 Project, Inc, Release 40100000
> Display Depth, Size: 24 bits, (1400,1050)
> Visual Class: DirectColor (5)
> Bits Per RGB: 8 (8/8/8)
> Physical Color Map Entries (Used / Total): 256 / 256
> Colormap: Private, 16777216 colors. Translation table: Bypassed
> Graphics pixels: Decomposed, Dither Method: Ordered
> Write Mask: 16777215 (decimal) ffffff (hex)
> Graphics Function: 3 (copy)
> Current Font: <default>, Current TrueType Font: <default>
> Default Backing Store: Req from Server.
> Window Status: ---------------------
> id typ( x, y, backing store) id typ( x, y, backing
> store)
> 0: Win( 640, 512, Req from Server)
>
> ----------------------
>
> $ xdpyinfo | more
> name of display: :0.0
> version number: 11.0
> vendor string: The XFree86 Project, Inc
> vendor release number: 40100000
> XFree86 version: 4.1.0
> maximum request size: 4194300 bytes
> motion buffer size: 256
> bitmap unit, bit order, padding: 32, LSBFirst, 32
> image byte order: LSBFirst
> number of supported pixmap formats: 7
> supported pixmap formats:
> depth 1, bits_per_pixel 1, scanline_pad 32
> depth 4, bits_per_pixel 8, scanline_pad 32
> depth 8, bits_per_pixel 8, scanline_pad 32
> depth 15, bits_per_pixel 16, scanline_pad 32
> depth 16, bits_per_pixel 16, scanline_pad 32
> depth 24, bits_per_pixel 32, scanline_pad 32
> depth 32, bits_per_pixel 32, scanline_pad 32
> keycode range: minimum 8, maximum 255
> focus: window 0x1a00012, revert to Parent
> number of extensions: 26
> BIG-REQUESTS
> DOUBLE-BUFFER
> DPMS
> Extended-Visual-Information
> FontCache
> GLX
> LBX
> MIT-SCREEN-SAVER
> MIT-SHM
> MIT-SUNDRY-NONSTANDARD
> RENDER
> SECURITY
> SGI-GLX
> SHAPE
> SYNC
> TOG-CUP
> XC-APPGROUP
> XC-MISC
> XFree86-Bigfont
> XFree86-DGA
> XFree86-Misc
> XFree86-VidModeExtension
> XInputExtension
> XKEYBOARD
> XTEST
> XVideo
> default screen number: 0
> number of screens: 1
>
> screen #0:
> dimensions: 1400x1050 pixels (404x303 millimeters)
> resolution: 88x88 dots per inch
> depths (7): 24, 1, 4, 8, 15, 16, 32
> root window id: 0x31
> depth of root window: 24 planes
> number of colormaps: minimum 1, maximum 1
> default colormap: 0x20
> default number of colormap cells: 256
> preallocated pixels: black 0, white 16777215
> options: backing-store NO, save-unders NO
> largest cursor: 32x32
> current input event mask: 0x5a20bd
> KeyPressMask ButtonPressMask ButtonReleaseMask
> EnterWindowMask LeaveWindowMask PointerMotionHintMask
> ButtonMotionMask StructureNotifyMask SubstructureNotifyMask
> SubstructureRedirectMask PropertyChangeMask
> number of visuals: 4
> default visual id: 0x23
> visual:
> visual id: 0x23
> class: TrueColor
> depth: 24 planes
> available colormap entries: 256 per subfield
> red, green, blue masks: 0xff0000, 0xff00, 0xff
> significant bits in color specification: 8 bits
> visual:
> visual id: 0x24
> class: TrueColor
> depth: 24 planes
> available colormap entries: 256 per subfield
> red, green, blue masks: 0xff0000, 0xff00, 0xff
> significant bits in color specification: 8 bits
> visual:
> visual id: 0x25
> class: DirectColor
> depth: 24 planes
> available colormap entries: 256 per subfield
> red, green, blue masks: 0xff0000, 0xff00, 0xff
> significant bits in color specification: 8 bits
> visual:
> visual id: 0x26
> class: DirectColor
> depth: 24 planes
> available colormap entries: 256 per subfield
> red, green, blue masks: 0xff0000, 0xff00, 0xff
> significant bits in color specification: 8 bits
>
Re: Sorry! I made a mistake. [message #30517 is a reply to message #30375] Sat, 27 April 2002 15:38 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Weiqun Zhang (zhang@ucolick.org) writes:

> Yes, I am. ".Xdefaults" can control the visual class. But if I start
> with a class, I cannot change to another.

Yes, that is correct. Once you have a visual class,
you cannot change to another in that IDL session.

> IDL> device,get_visual_name=temp & print, temp
> DirectColor
> IDL> DEVICE, TRUE_COLOR=24

Whoops! Too late. By asking for the name of the
visual class, you had to establish a visual class
connection. This is the same as opening a window.
You must set the visual class FIRST!!! Usually
this is done as the FIRST command in an IDL
startup file.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@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: Sorry! I made a mistake.
Next Topic: IDL & Tomography

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

Current Time: Sat Oct 11 10:08:45 PDT 2025

Total time taken to generate the page: 0.40498 seconds