Home »
Public Forums »
archive »
Re: invert_ct?
Re: invert_ct? [message #4576 is a reply to message #4569] |
Wed, 07 June 1995 00:00  |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <3r3979$25me@yuma.ACNS.ColoState.EDU>, dean@phobos.cira.colostate.edu writes:
>
> There is h_eq_ct and gamma_ct, but is there a invert_ct to invert the
> color table of a raster image. If not, what would be the simplist way
> to invert the color table of an image with IDL?
>
xloadct() has an "invert_ct" option. Here is the code which does it.
"REVERSE" : BEGIN ;Reverse the table
l = lindgen(ncolors) + cbot
r_orig(cbot) = reverse(r_orig(l))
g_orig(cbot) = reverse(g_orig(l))
b_orig(cbot) = reverse(b_orig(l))
goto, set_gamma ;And redraw
ENDCASE
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
|
|
|
Current Time: Sun Oct 12 06:44:10 PDT 2025
Total time taken to generate the page: 1.28058 seconds