Re: No colour with TVRD and WRITE_GIF [message #12551] |
Wed, 19 August 1998 00:00 |
Stubbe F. Hviid
Messages: 2 Registered: August 1998
|
Junior Member |
|
|
Paul,
Two things:
You need to tell tvrd() that you want all three color channels (red green
and blue)
try:
image=tvrd(/TRUE)
And you will want to use another graphics format than GIF. (ether TIFF or
JPEG)
write_tiff, 'filename', image
The problem with GIF is that the format uses a 256 color pallette.
Internally IDL stores the image as a 24bit image (three channels of 8 bit),
thus you need to reduce the 16 million different colors IDL uses to 256.
There is a routine called color_quan (I think :-) ) which does this, but the
results are not terribly good.
It is much better to save the image in a 24 bit image format and then use
for example photoshop to generate the GIF file.
Stubbe
Paul Smith wrote in message <6rb1j1$j54$1@news.latrobe.edu.au>...
> Hi,
> I have a colour plot in a window that I read in with TVRD and then output
to
> a GIF with WRITE_GIF. The problem is it only comes out in B&W. At first I
> thought this was WRITE_GIF's problem, but the correct colour palette is
> saved with the image. Then I noticed that the array resulting from TVRD
has
> only values 0 and 255. In other words all my colour lines have been made
> white. I've spent a fair bit of time looking through the colour
information
> in the manual but no luck.
>
> A couple of points;
> I'm using IDL 5.1 on Win95 with the display set to High Color (16 bit)
> I normally do a DEVICE,decomposed=0 (in startup.pro) before any plotting or
> else I just get shades of red
> I also tried changing the backing store to 2 (handled by IDL)
>
> This seems like it should be a pretty simple task but it eludes me.
> Thanks for any help,
> Paul
>
>
|
|
|