Re: Changing the Colour Table for RGB images on Linux/Solaris [message #38733 is a reply to message #38732] |
Fri, 26 March 2004 08:49   |
Philip Kershaw
Messages: 5 Registered: March 2004
|
Junior Member |
|
|
Your solution is the same as a colleague of mine had tried. I will go with
that. - It confirms things + from your explanation it makes more sense.
I did want to avoid actually altering the image but I can make a temporary
copy so it's not really a problem. I'm only displaying the image viewport
at any one time so it takes up little extra memory.
Thanks for your help,
Phil
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.1acdf1f2f128526e989718@news.frii.com...
> 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/
|
|
|