device, get_decomposed question [message #17171] |
Tue, 14 September 1999 00:00  |
Daniel Peduzzi
Messages: 29 Registered: June 1999
|
Junior Member |
|
|
The use of the "get_decomposed" query seems to be affecting the
way my images are displayed. If I comment out the second device
command, I see the expected behavior: the second image contains
shades of red. If I leave the command in, I get another grayscale image.
Why would a query command affect any kind of display operation?
I'm sure I'm missing something here.
device, true_color=24, decomposed=0
; The appearance of the last image depends upon whether the next line is commented out
device, get_decomposed=isDecomposed
; Load grayscale color tables
r = indgen(256)
g = indgen(256)
b = indgen(256)
tvlct, r, g, b
; Make a simple image and display it
image = indgen(128,128)
image = bytscl(image)
window, 30, xsize=128, ysize=128
tv, image
stop ; and look at the pretty grayscale image
; Now reload the color tables so that only a red component is present.
g(*)=0
b(*)=0
tvlct, r, g, b
tv, image ; Hopefully, I'm seeing red
end
|
|
|
Re: device, get_decomposed question [message #17271 is a reply to message #17171] |
Thu, 16 September 1999 00:00  |
m218003
Messages: 56 Registered: August 1999
|
Member |
|
|
In article <37E1152F.B9AA0197@ssec.wisc.edu>,
Liam Gumley <Liam.Gumley@ssec.wisc.edu> writes:
> Apparently there's something odd happening in IDL for UNIX (at least on my SGI box).
Hi Liam,
seems to be the same problem as I recently pointed out to you for my
Linux box: as you mentioned yourself if you seperate the
device,decomposed=0 statement from the device,true=24 statement it
should also work (? cannot test it right now since I only have 8 bit
color at work).
Cheers,
Martin
> Here's an example I just ran in a new IDL 5.2 session without a startup file:
>
> device, true=24, decomposed=0
> device, get_decomposed=decomp
> print, decomp
> 1
>
> The following session however gives the desired blue/white image:
>
> device, true=24, decomposed=0
> window, /free ;- Lock in truecolor un-decomposed mode
> device, get_decomposed=decomp
> print, decomp
> 0
>
>
> IDL 5.2 under Windows does not have this problem: both of the examples above produce a
> blue/white image.
>
> Cheers,
> Liam.
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 441787 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|
Re: device, get_decomposed question [message #17276 is a reply to message #17171] |
Thu, 16 September 1999 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Daniel Peduzzi wrote:
> The use of the "get_decomposed" query seems to be affecting the
> way my images are displayed. If I comment out the second device
> command, I see the expected behavior: the second image contains
> shades of red. If I leave the command in, I get another grayscale image.
>
> Why would a query command affect any kind of display operation?
> I'm sure I'm missing something here.
>
> device, true_color=24, decomposed=0
>
> ; The appearance of the last image depends upon whether the next line is commented out
> device, get_decomposed=isDecomposed
>
> ; Load grayscale color tables
> r = indgen(256)
> g = indgen(256)
> b = indgen(256)
> tvlct, r, g, b
>
> ; Make a simple image and display it
> image = indgen(128,128)
> image = bytscl(image)
> window, 30, xsize=128, ysize=128
> tv, image
>
> stop ; and look at the pretty grayscale image
>
> ; Now reload the color tables so that only a red component is present.
> g(*)=0
> b(*)=0
> tvlct, r, g, b
>
> tv, image ; Hopefully, I'm seeing red
>
> end
Apparently there's something odd happening in IDL for UNIX (at least on my SGI box).
Here's an example I just ran in a new IDL 5.2 session without a startup file:
device, true=24, decomposed=0
device, get_decomposed=decomp
print, decomp
1
loadct, 1
tvscl, dist(256)
device, get_decomposed=decomp
print, decomp
1
Although I loaded the blue/white color table, the image displayed as greyscale because
the color table is bypassed in decomposed color mode. So the second statement must be
corrupting the decomposed setting.
The following session however gives the desired blue/white image:
device, true=24, decomposed=0
window, /free ;- Lock in truecolor un-decomposed mode
device, get_decomposed=decomp
print, decomp
0
loadct, 1
tvscl, dist(256)
device, get_decomposed=decomp
print, decomp
0
IDL 5.2 under Windows does not have this problem: both of the examples above produce a
blue/white image.
Cheers,
Liam.
--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
|
|
|