comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: writing color images - revisited
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: writing color images - revisited [message #8019] Fri, 31 January 1997 00:00
gurman is currently offline  gurman
Messages: 82
Registered: August 1992
Member
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. |
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: 'tvim' and 'contour' problem.
Next Topic: Re: Droplist Widgets (multiple)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:59:10 PDT 2025

Total time taken to generate the page: 0.00574 seconds