In article <5cr0ts$cv@news.Hawaii.Edu>, gennari@universe.Hawaii.edu (Scott
Gennari) wrote:
> Hi all,
>
> I'm trying to combine 3 grayscale satellite images to create
> a false color composite using the following code
>
> read_gif,'ir2.gif',ir2,r,g,b
> read_gif,'ir4.gif',ir4,r,g,b
> read_gif,'ir5.gif',ir5,r,g,b
> window,0,xsize=570,ysize=460
> tv,ir2
> red = tvrd(0,0,570,460,channel=1)
> tv,ir4
> green = tvrd(0,0,570,460,channel=2)
> tv,ir5
> blue = tvrd(0,0,570,460,channel=3)
> ;b=tvrd()
> tv,red,channel=3
> tv,green,channel=2
> tv,blue,channel=1
> test = tvrd()
> write_gif,'spam.gif',test,r,g,b
>
>
> This will display the colorized GIF to the screen but when I write
> it to a gif file it comes out grayscale.
>
> What am i missing here?
Scott -
As best I understand it, it's because GIF images don't have
"channels," just a single, 8-bit color table. It would be easy to make a
JPEG image, however:
IDL> image = [[r(ir2)], [g(ir4)], b[(ir5)]]
IDL> WRITE_JPEG, <filename>, image, true = 3, qual =100
though I haven't tried it lately.
Joe Gurman
--
| Joseph B. Gurman / NASA Goddard Space Flight Center / Solar | | Physics Branch / Greenbelt MD 20771 / gurman@gsfc.nasa.gov |
| Civil servants aren't allowed to have opinions while ar work. |
| Therefore, any opinions expressed herein must be someone else's. |
|