Re: Color Postscript output [message #3388 is a reply to message #3384] |
Thu, 12 January 1995 07:31  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
spencer@jhs.nrl.navy.mil (John Spencer) writes:
> I'm trying to make a color postscript file from IDL version
> { mipseb IRIX 3.5.1} on an SGI running Irix 5.2.
> IDL> set_plot,'PS' ; turn on postscript
> IDL> device,/color ; enable color (RM: 3-31)
> IDL> loadct,12 ; load a color table
> IDL> print,!d.n_colors
> 256
> IDL> device,color=0 ; turn off colors
> IDL> print,!d.n_colors
> 256
I've run into this before. IDL always thinks that PostScript devices have 256
colors. In color mode this makes sense. In non-color mode it also makes sense
because one can have up to 256 shades of grey.
It would make a certain amount of sense if the value of !D.N_COLORS reflected
the value of BITS_PER_PIXEL which can be other values besides 8, but it
doesn't.
> This, plus my inability to find a color table that makes colors
> come out in any postscript reader/printer I have, leads me to
> believe I'm confused. Can someone help?
I don't understand this second question. If you say DEVICE,/COLOR and
LOADCT,12 you should be able to create a color PostScript file that is then
compatible with any color PS printer you might have. Most PostScript viewers
such as ghostview or xpsview should also be capable of showing you the colors.
Maybe you can clarify the second part of your question.
Bill Thompson
|
|
|