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

Home » Public Forums » archive » Re: color tiffs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: color tiffs [message #72365 is a reply to message #72364] Sat, 04 September 2010 09:57 Go to previous messageGo to previous message
David Grier is currently offline  David Grier
Messages: 35
Registered: July 2010
Member
On 9/4/10 12:43 PM, Hawaiianite wrote:
> I can't seem to get tiffs written out in color. Silly, but true.
>
> IDL> write_tiff,'title',(array[*,*,2]),/float
>
> I get a grey scale image even when I've set device,decomposed=0 and
> loaded a color table (39). The resulting file is larger compared to
> the black and white tiffs I produced with bytscl'ing', but it is not
> in color. Any suggestions?
>
> Thanks!

How about ...

IDL> write_tiff, 'title', array[*,*,0:2], /float

The command you provided above creates a tiff image with only one color
channel (index 2), and thus yields a grayscale image. Storing
a color image requires all three color channels, which I assume
are in indices 0, 1, and 2 of "array". I also assume that you're not
using indexed colors because you're storing pixels as floating-point
values. If you were using indexed colors, you'd have to save the
color table in the write_tiff command.

The floating-point image created by your command is larger than a
bytscl'ed image because each floating-point pixel requires 4 bytes (?),
whereas each bytscl'ed pixel requires just one.

TTFN,

David
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Is there anyway to retrieve events from plot in IDL 8.0
Next Topic: Re: Renaming tags in an array of structures

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

Current Time: Sun Nov 30 23:23:56 PST 2025

Total time taken to generate the page: 1.27472 seconds