[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Color woes



Hi, folks - 
	I am posting this for a friend who does not have access to this
newsgroup. She is having trouble displaying images in color - I sent
her to David Fanning's device,decomposed=0 page but she is still having
trouble. I asked her to provide information about the version of IDL,
her machine, operating system, graphics card, and a coded example of the
specific problem she has. Here is her reply. I hope some of you color
experts can pass on a suggestion to her about what to try. Thanks!
	(Please post reply here, but feel free to cc: to Rebecca at
rdanos@astro.ucla.edu if you think you can help her directly.)
My hunch is that her machine is set up for 16-bit color, but I can't
be sure.
	Thanks everyone, 
Dick French


>1) version of IDL, and info about the display
>	IDL> print,!version

{ sparc sunos unix 5.4 Sep 25 2000      32      64}

>	IDL> help,/device
When I do this I get an error:

Available Graphics Devices: CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
Current graphics device: X
% Unsupported X Windows visual (class: StaticGray, depth: 0).
  Substituting default (class: <UndefinedVisual>, Depth: 0).
% Execution halted at:  $MAIN$

>2) machine and operating system (and version) - if you
>are running Linux, I'd need to know the graphics card
>you are using.

I've been coming accross this problem on two different Linux systems and
one SunOs.  One of the Linux computers is just a PC and says it has a
generic graphics device.  It runs version RedHat 6.0.  Another Linux PC
I tried runs RedHat 6.1 and also says it has a generic graphics device
but
also says it uses device "Matrox|MGA G200 AGP [Millennium] AGP".

>
>3) the specific error message you get when you try
>device,decomposed=0
>

IDL> device,decomposed=0
% Unsupported X Windows visual (class: StaticGray, depth: 0).
  Substituting default (class: <UndefinedVisual>, Depth: 0).
% Execution halted at:  $MAIN$


>Another thing you might want to do is to try these
>commands first thing after starting IDL - I have them
>in my startup file:

These didn't work either.

>device,true_color=24

It will display the image, but not in the specified color table.

>window,/FREE,/PIXMAP,colors=-10,xsize=10,ysize=10
>wdelete,!d.window
>device,decomposed=0,retain=2
>device,get_visual_depth=depth
>print,'Display depth: ', depth
>print,'Color table size: ', !d.table_size

First of all, I don't get errors only when I start off with the
device,true_color=24 or pseudo_color=16.  The errors I get are:
% Unsupported X Windows visual (class: StaticGray, depth: 0).
  Substituting default (class: <UndefinedVisual>, Depth: 0).
% Execution halted at:  $MAIN$

>in IDL that attempts to display what you want but fails,
>you can send that along, including a description of what
>went wrong.
>
Here is a demonstration:
image = Congrid(Dist(200), !D.X_Size, !D.Y_Size)
device,true_color=24
loadct, 11
tv,image

I get this:

IDL> image = Congrid(Dist(200), !D.X_Size, !D.Y_Size)
% Compiled module: DIST.
% Compiled module: CONGRID.
IDL> device,true_color=24
IDL> loadct, 11
% Compiled module: LOADCT.
% Unsupported X Windows visual (class: TrueColor, depth: 24).
  Substituting default (class: TrueColor, Depth: 16).
% Compiled module: FILEPATH.
% LOADCT: Loading table BLUE-RED
IDL> tv,image