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

Home » Public Forums » archive » Re: Using Postscript & Colours in IDL
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: Using Postscript & Colours in IDL [message #58332 is a reply to message #58331] Mon, 28 January 2008 05:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
chloesharrocks@gmail.com writes:

> Most of the time this works fine, but occaisionally when I run the
> program it comes up with an error on the "device, decomposed=3D0" line.
> However, if I shut down IDL and restart it it will work fine again.
> Also, although "color=3D4" looks lime green on my computer, when I print
> it, the colour is more of a bluey-turquoise colour and similarly the
> "color=3D5" which is red looks magenta when printed (is this likely to
> be to do with the printer?). If someone, could explain to me how to
> incorporate colour into postscript files in a way that doesn't cause
> this error every time I'd be most grateful. This is my first time
> using IDL and my first ever encounter with postscript files (I'm an
> undergraduate at Uni).

You don't need to set DECOMPOSED=0 in a PostScript device.
PostScript *is* an 8-bit device (sigh...) so it is automatically
in no-decomposed or indexed color all the time. And, anyway,
this is not an allowed keyword when your device is PostScript.
So, the problem is not that is doesn't work sometime, it
is that it works *any time*. :-)

There are several commands (WINDOW is another) that you
sometimes like to have in a program that shows up on your
display, but you don't want (or can't have) in a program that
is suppose to draw its contents in a PostScript file. In
general, you protect these commands in your code by doing
something like this:

IF (!D.Flags AND 256) NE 0 THEN Device, Decomposed=0

When display colors (produced with light) don't look like
printed colors (produced with dyes and inks), the solution
is to purchase a $25K monitor and a $5K calibration setup
and make sure you know how to use them. I'm saying, this
may be a problem you have to live with unless your research
gets you big contracts with the fashion layout folks.

PostScript is more complicated than it needs to be in IDL,
and it doesn't help newbies when they find the PS way of
doing things is still back in the 1970's. (Which you would
discover if you tried to display an image, since you aren't
setting the BITS_PER_PIXEL keyword on the DEVICE command
to 8 either. Your images will look sickly, but I would
blame this on ITTVIS and not you.)

There are lots of articles about PostScript color on my web
page:

http://www.dfanning.com/documents/tips.html#PostScript

But, since you are new to this, I would *seriously* recommend
you download a couple of programs (well, *all* of them, really!)
from my web page, as they were written *especially* to solve
PostScript and wacky color problems. Here are the ones I couldn't
live without:

http://www.dfanning.com/programs/tvimage.pro
http://www.dfanning.com/programs/tvread.pro
http://www.dfanning.com/programs/fsc_color.pro
http://www.dfanning.com/programs/fsc_psconfig.zip

If you use PSCONFIG to set up your PostScript device you will
probably never encounter most of the problems that stop the
new IDL user dead in their tracks. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl 7.0 eclipse plugins and updates
Next Topic: Europe/Africa province boundaries

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

Current Time: Sat Oct 11 01:08:31 PDT 2025

Total time taken to generate the page: 0.39877 seconds