Re: Problems with color tables and write_png [message #55880] |
Mon, 17 September 2007 14:58 |
kathryn.ksm
Messages: 10 Registered: April 2006
|
Junior Member |
|
|
>> Colormap: Shared, 16777216 colors. Translation table: Enabled
>
> Well, "enabled" bothers me. And it could explain a great
> many of these odd problems, it seems to me. Is it possible
> you are running some kind of a startup file (either IDL
> or .cshrc or something) that is turning this translation
> table feature on? Maybe something you got from a friend who
> doesn't have your best interests at heart?
>
> Anyway, try this:
>
> DEVICE, BYPASS_TRANSLATION=0
>
Ah, that's intriguing... actually, I think DEVICE,
BYPASS_TRANSLATION=1 is what I want. I had DEVICE,
BYPASS_TRANSLATION=0 in a startup file that, indeed, I got from a
friend (who probably didn't have my best interests in mind). Almost
everything else in that startup file makes sense to me, but I had no
idea about this one. And bingo! That seems to be the trick. By
setting the bypass to 1 I got a png file that actually looks right! I
think that might have solved the problem....
Thanks so much! Phew!
Kathryn
|
|
|
Re: Problems with color tables and write_png [message #55881 is a reply to message #55880] |
Mon, 17 September 2007 14:47  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
kathryn.ksm@gmail.com writes:
> Here's what I get:
> 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 X.Org Foundation, Release 60802000
> Display Depth, Size: 24 bits, (1280,1024)
> Visual Class: TrueColor (4)
> Bits Per RGB: 8 (8/8/8)
> Physical Color Map Entries (Emulated / Actual): 256 / 256
> Colormap: Shared, 16777216 colors. Translation table: Enabled
> 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: Pixmap.
And you are physically sitting on this machine, right?
You aren't running over some kind of X window emulator
or anything?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Problems with color tables and write_png [message #55882 is a reply to message #55881] |
Mon, 17 September 2007 14:45  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
kathryn.ksm@gmail.com writes:
>> You have problems. :-)
>
> Beyond being too stupid to understand IDL's colors?
I'm not sure these problems are of your own devising. :-)
>> Could you tell us, please, the result of the following
>> command:
>>
>> IDL> Help, /Device
>
> Here's what I get:
> 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 X.Org Foundation, Release 60802000
> Display Depth, Size: 24 bits, (1280,1024)
> Visual Class: TrueColor (4)
> Bits Per RGB: 8 (8/8/8)
> Physical Color Map Entries (Emulated / Actual): 256 / 256
> Colormap: Shared, 16777216 colors. Translation table: Enabled
Well, "enabled" bothers me. And it could explain a great
many of these odd problems, it seems to me. Is it possible
you are running some kind of a startup file (either IDL
or .cshrc or something) that is turning this translation
table feature on? Maybe something you got from a friend who
doesn't have your best interests at heart?
Anyway, try this:
DEVICE, BYPASS_TRANSLATION=0
Now do colors make more sense to you. In particular,
TVREAD should now be able to make a PNG of what is in
your window without difficulty.
IDL> void = TVREAD(/PNG)
Let us know.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Problems with color tables and write_png [message #55883 is a reply to message #55882] |
Mon, 17 September 2007 13:54  |
kathryn.ksm
Messages: 10 Registered: April 2006
|
Junior Member |
|
|
> You have problems. :-)
Beyond being too stupid to understand IDL's colors?
>
> Could you tell us, please, the result of the following
> command:
>
> IDL> Help, /Device
Here's what I get:
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 X.Org Foundation, Release 60802000
Display Depth, Size: 24 bits, (1280,1024)
Visual Class: TrueColor (4)
Bits Per RGB: 8 (8/8/8)
Physical Color Map Entries (Emulated / Actual): 256 / 256
Colormap: Shared, 16777216 colors. Translation table: Enabled
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: Pixmap.
I should note that I have problems like this whenever I use any form
of color table. I routinely make contour plots with a greyscale
colortable, and when I write those to png files, the background always
goes blue. Not such a big deal there, but when I am trying to use the
colors to represent things, I have trouble.
Thanks!
Kathryn
|
|
|
|