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

Home » Public Forums » archive » Re: Color Postscript output
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: Color Postscript output [message #3379] Fri, 13 January 1995 11:28
spencer is currently offline  spencer
Messages: 2
Registered: January 1995
Junior Member
In article <3f3i0u$2tg@post.gsfc.nasa.gov>, thompson@orpheus.nascom.nasa.gov (William Thompson) writes:
|> 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
|> [snip]
|> >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
Thanks to Walter Gross (wally@halfhalt),
Joseph B. Gurman (gurman@uvsp.gsfc.nasa.gov), and
thompson@orpheus.nascom.nasa.gov (William Thompson) for responding. However,
using

IDL> device,bits=8,/color

makes no difference. Bill, all I meant by the second part is that I've tried
a color postscript printer, ghostview, xpsview, and grepping the idl.ps
file directly. The information just isn't there. In this particular case,
I wasn't trying to get a fancy image with false colors, but I would like to
do that in the future. I'm really not interested in storing an image and
converting it to PS, but I could, I guess.

thanx
john
Re: Color Postscript output [message #3381 is a reply to message #3379] Fri, 13 January 1995 08:48 Go to previous message
gurman is currently offline  gurman
Messages: 82
Registered: August 1992
Member
In article <3f1eu6$e1t@ra.nrl.navy.mil>, spencer@jhs.nrl.navy.mil (John
Spencer) wrote:

> 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
>
> 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?

John -

Have you tried setting

IDL> device, bits = 8

after the device, /color ?

Joe Gurman

--
J.B. Gurman / Solar Physics Branch/ NASA Goddard Space Flight Center/
Greenbelt MD 20771 USA / gurman@uvsp.gsfc.nasa.gov
| Federal employees are still prohibited from holding opinions while|
| at work. Therefore, any opinions expressed herein are somebody |
| else's. |
Re: Color Postscript output [message #3384 is a reply to message #3381] Fri, 13 January 1995 02:21 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <3f3i0u$2tg@post.gsfc.nasa.gov>, thompson@orpheus.nascom.nasa.gov (William Thompson) writes:
|> spencer@jhs.nrl.navy.mil (John Spencer) writes:
[...snip...]
|> >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
|>

I seem to remember having this problem, and I think the solution is
just to include BITS_PER_PIXEL=8 in the DEVICE,/COLOR call.

Good luck.

Stein Vidar
Re: Color Postscript output [message #3388 is a reply to message #3384] Thu, 12 January 1995 07:31 Go to previous message
thompson is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Overlaying axes on an image?
Next Topic: RANDOMU bug?

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

Current Time: Wed Oct 08 15:13:29 PDT 2025

Total time taken to generate the page: 0.00697 seconds