Re: Changing the Colour Table for RGB images on Linux/Solaris [message #38741 is a reply to message #38740] |
Fri, 26 March 2004 06:53   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Philip Kershaw writes:
>
>> When I alter the colour table I re-display the image using
>>
>> TV, image, True=3
>
> Oh, the substituted TVIMAGE command should be this:
>
> TVIMAGE, image
>
> It can figure the "true" stuff out at the same time it is
> figuring out what kind of device it is on.
Oh, dear! Working too fast this morning. My mind is
on finding more warm clothes around the house. :-(
Here is what I think is happening.
On UNIX machines, a true-color image is a true-color
image. There is no color table involved whatsoever.
(This is the way it *ought* to be, IMHO. I think it is
Windows who is nuts.) A true-color image carries around
its own color table, always! Otherwise, what would be
the point?
Of course, this makes it more difficult to deal with
color tables, but there really is no *point* to a color
table with a true-color image. If you want to work with
color tables, use 2D images. If you insist on working
with true-color images, then you will have to create
your own true-color image from the color table in
question:
TVLCT, r, g, b, /Get
myimage[*,*,0] = r[myimage[*,*,0]
myimage[*,*,1] = g[myimage[*,*,1]
myimage[*,*,2] = b[myimage[*,*,0]
TV, myimage, True=3
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|