Color conversions [message #61247] |
Thu, 10 July 2008 09:01  |
MichaelT
Messages: 52 Registered: May 2006
|
Member |
|
|
Hi all,
here is something I'd like to do and I do not know how, despite some
lengthy searches and trials:
Say, I have displayed an image in a window and plotted some other
things on top. All that with a certain color table. Later, I want to
switch to a different color table and display the very content with
the new color table. I do not want to do all the displaying and
plotting, again. Just read the content of the window an display it
with another color table. So I tried something with TVRD - without any
success.
How would you do it? Is there a simple way?
Thanks,
Michael
|
|
|
Re: Color Conversion [message #80944 is a reply to message #61247] |
Fri, 20 July 2012 12:30  |
Marc[1]
Messages: 2 Registered: July 2012
|
Junior Member |
|
|
On Friday, July 20, 2012 12:53:30 PM UTC-4, David Fanning wrote:
> Marc writes:
>
> > I am currently working with a 3D array defined by (longitude, latitude, color), with the color dimension being of size 3 representing an RGB color scale. This, however, is causing me some problems since I need to scale the color value to the value that it actually represents on the (longitude, latitude) grid for later conversion, and so I ultimately want a 2D array with the RGB color scale converted to a color index scale from 0 to 255, with 0 as black and 255 as white.
> Any thoughts or suggestions on how to go about doing this process?
> >
>
> http://www.idlcoyote.com/ip_tips/color2gray.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
I got it. Thanks for the help!
|
|
|
Re: Color Conversion [message #80946 is a reply to message #61247] |
Fri, 20 July 2012 09:53  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Marc writes:
> I am currently working with a 3D array defined by (longitude, latitude, color), with the color dimension being of size 3 representing an RGB color scale. This, however, is causing me some problems since I need to scale the color value to the value that it actually represents on the (longitude, latitude) grid for later conversion, and so I ultimately want a 2D array with the RGB color scale converted to a color index scale from 0 to 255, with 0 as black and 255 as white.
Any thoughts or suggestions on how to go about doing this process?
>
http://www.idlcoyote.com/ip_tips/color2gray.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|