[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: color table trouble



Well, I'm full of ideas today... :-)

I wrote just a moment ago:

> But here is the real kicker reason for me: if I
> *care* about displaying my 24-bit images correctly
> (and color decomposition really only makes sense
> if I have 24-bit images, it seems to me) then--as
> I posted last week--I HAVE to set the DECOMPOSED
> keyword anyway:
> 
>    Device, Decomposed=1
>    TV, image24
> 
> If I don't do this, then I run the risk that my
> image will not be displayed properly, since with
> color decomposition off, ALL values, even those in
> 24-bit image values, are run through the color table.

Even this is not the whole story, because--of course--
the DECOMPOSED keyword is not an allowed keyword for
any graphics device EXCEPT X, Win, and Mac. So if I 
want to write code that *always* works in *every*
environment (and who among us doesn't?) then I have
to wrap EVERY single TV command with something like
this:

   CASE StrUpCase(!D.Name) OF
      'WIN' : Device, Decomposed=1
      'MAC' : Device, Decomposed=1
       'X'  : Device, Decomposed=1
      ELSE:
   ENDCASE
   TV, image24, TRUE=1

Even at $100/hour I find it hard to type that much code
each time I want to display an image. :-(

Cheers,

David

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155