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

Home » Public Forums » archive » Re: xwindows colour issues
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: xwindows colour issues [message #12788] Thu, 10 September 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Gary Beard (agb@aber.ac.uk) writes:

> I'm working with IDL version 4.0.1 (OSF alpha) under UNIX through
> xwindows
> from Windows NT. I'm finding the use of colour tables highly problematic
> at the
> moment. I'd like to run NT with more than 256 colours, but this seems to
> confuse
> IDL's implementation of colour table values. Is there a book or a web
> page that
> could help me with this. The manuals are woefully inadequate on the
> subject.

Well, I am afraid it is going to get even more confusing
to you when you upgrade your IDL, since color handling
has changed once again. :-(

The change this time was to fix a long-standing bug in
the way the PC handled color and bring it into line
with the other platforms, which I think is a wonderful
idea. But the short answer to your question is to work
with color tables in IDL when in a 16-bit or 24-bit
environment, it is essential to turn color decomposition
off:

Device, Decomposed=0

The downside of working in a 16-bit or 24-bit environment
is that graphics colors you display in window will not
automatically change when you change color tables. You
will have to redisplay the graphic to run it through
the new color table and get the new colors.

To get around this, and to write programs that automatically
update themselves when colors change, you must write
widget programs and you need other color changing tools
besides the ones that come with IDL. You can find a
number of these tools and programs on my web page.
Two that you will find immediately useful are
XWindow and XColors.

http://www.dfanning.com/programs/xwindow.pro
http://www.dfanning.com/programs/xcolors.pro

XWindow, by the way, will allow you to display your
output in GIF, TIFF, JPEG, and PostScript. It is also
a resizeable graphics window and it will work equally
well on an 8- 16- or 24-bit systems. To try it out,
download XWindow and XColors and type this:

XWindow, 'Shade_Surf', Dist(15), /Output, /XColors

Whoops! Forgot you are on version 4 of IDL. These programs
will probably not work for you, although you can find older
versions in my IDL 4 archive.

ftp://ftp.dfanning.com/pub/dfanning/outgoing/idl_examples/ar chive4/

If you want to learn how to write programs like this for
yourself, you may want to pick up a copy of my book, IDL
Programming Techniques. Writing programs that work the
same in 8-bit and 24-bit color environments was one of
my primary goals for the book. Explaining color handling
in more detail was one of the major updates in the fourth
printing of the book, which just returned from the printers
this week.

You can order the book from RSI, through FPS (your IDL distributors
in the UK), or from me. I'm probably the only one who offers
a 10% discount if you say you heard about the book on the
IDL newsgroup though. :-)

Cheers,

David

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Current Idl spec results: for Alpha-NT4
Next Topic: Support for image formats

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

Current Time: Wed Oct 08 18:11:00 PDT 2025

Total time taken to generate the page: 0.00607 seconds