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

Home » Public Forums » archive » Re: 24-bit color Postscript
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: 24-bit color Postscript [message #12729] Tue, 08 September 1998 00:00
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
> This is not the most lucid explanation I've even written (I've
> had a few beers to celebrate the worker's cause)

Actually, David, that is the most lucid explanation you've even [sic, hic]
written.

> , so let
> me know if you have any questions. :-)

What was the beer?

--
Mark Hadfield, m.hadfield@niwa.cri.nz http://www.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
Re: 24-bit color Postscript [message #12731 is a reply to message #12729] Mon, 07 September 1998 00:00 Go to previous message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <MPG.105cfb2b4b2f224e98969d@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:

> Well, you might think, since this is a 24-bit PostScript
> printer you've got here, that you can draw a line in a color
> like you would on your display device (I.e., specify the
> color as a 24-bit integer value).
> But, unfortunately, this does NOT work in PostScript.
> Even though you can display 24-bit color images in PostScript,
> you can't for some reason write 24-bit colors like this.
> In fact, you MUST use the INDEXED color model to draw a
> line in a color. But this is not much of a problem in a
> 24-bit world, since you aren't really using the color
> table for anything else.

My thanks to David. I have already replied to him by e-mail.

Is this a Postscript limitation or an IDL limitation? In either case, it
sucks. I need to plot points, not just images, using 24-bit color. That
is, I want to plot thousands of points using more than 256 different
colors. Is there no workaround for this?

I just spent a lot of time developing an IDL application only to find out
I can't print with it. You tell me if you could have learned that from
the description of the Postscript device in the reference manual.

I suppose I'll have to do a high-resolution X image and dump it to the
printer, which defeats the whole point of using Postscript.

Ken Bowman
Re: 24-bit color Postscript [message #12736 is a reply to message #12731] Sun, 06 September 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Kenneth P. Bowman (bowman@null.tamu) writes:

> I have an IDL application that creates 24-bit X displays consisting of a
> grayscale image with points plotted on top in color using PLOTS. (Yes, it
> really is preferable to do this using 24-bit color.) Color works fine on
> the screen, but everything comes out grayscale in Postscript. This is
> direct graphics, BTW.
>
> I have read the Reference manual section on color Postscript, but it is
> less than clear. It only addresses color images, not 24-bit color created
> with things like PLOTS.
>
> My copy of David Fanning's book is at work, so I have not been able to
> check it (will do so in the morning).
>
> Any suggestions?

Buy another book for home.

Oh!? You mean about color PostScript? :-)

Well, you might think, since this is a 24-bit PostScript
printer you've got here, that you can draw a line in a color
like you would on your display device (I.e., specify the
color as a 24-bit integer value). For example, if I am
working on a 24-bit display with color decomposition turned
on and I want to draw a line in a yellow color, I would
type this:

PlotS, [0,1], [0,1], /Normal, Color=65635

Or, more likely, since I don't normally think in binary
arithmetic, I might type:

PlotS, [0,1], [0,1], /Normal, Color='00ffff'x

But, unfortunately, this does NOT work in PostScript.
Even though you can display 24-bit color images in PostScript,
you can't for some reason write 24-bit colors like this.
In fact, you MUST use the INDEXED color model to draw a
line in a color. But this is not much of a problem in a
24-bit world, since you aren't really using the color
table for anything else. (Your 24-bit image colors
were expressed *directly* through the actual
pixel values of the image and didn't go *through* the
color table.)

So, I can display a grayscale image and put a yellow
line on top of this image like this:

TV, image ; or TV, image24, True=1, etc.
TVLCT, 255, 255, 0, 10
PlotS, [0,1], [0,1], /Normal, Color=10
Device, /Close_File

This is not the most lucid explanation I've even written (I've
had a few beers to celebrate the worker's cause), so let
me know if you have any questions. :-)

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: Re: IDL memory question
Next Topic: Widget Placement

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

Current Time: Wed Oct 08 15:16:03 PDT 2025

Total time taken to generate the page: 0.14680 seconds