Re: color tiffs [message #72364] |
Sat, 04 September 2010 10:14  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Sep 4, 1:43 pm, Hawaiianite <jtmcah...@gmail.com> 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!
Besides the points David mentioned, note that the device routine and
the current colortable only affect things done to direct graphics
devices. write_tiff has nothing to with direct graphics.
|
|
|
Re: color tiffs [message #72365 is a reply to message #72364] |
Sat, 04 September 2010 09:57   |
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
|
|
|
Re: color tiffs [message #72524 is a reply to message #72364] |
Fri, 17 September 2010 07:22  |
jtmcahill
Messages: 26 Registered: October 2007
|
Junior Member |
|
|
On Sep 4, 1:14 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Sep 4, 1:43 pm, Hawaiianite <jtmcah...@gmail.com> 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!
>
> Besides the points David mentioned, note that the device routine and
> the current colortable only affect things done to direct graphics
> devices. write_tiff has nothing to with direct graphics.
Ok, well is there a way I can make a color tiff with one channel? I
need to keep the channels separate in displaying this data...
Thanks!
|
|
|