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

Home » Public Forums » archive » Re: Baffled by color postscript
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: Baffled by color postscript [message #14561 is a reply to message #14560] Mon, 08 March 1999 00:00 Go to previous messageGo to previous message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <MPG.114df9eb8bc3875398970e@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:

> Here is where I am the shakiest. I'm going to assert that
> even if you COULD produce 24-bit PostScript output (and
> I don't think you can from within IDL), there probably
> isn't a printer around that could print it. I say this
> based on my own understanding of printing technology and
> a real quick look around the web for 24-bit color printers.
> The best I found was a printer that claims to print in
> 4-color CMYK color. Anyway, if someone knows better I'd love
> to hear from you.
>
> But that said, I am quite certain that you cannot get 24-bit
> PostScript color out of IDL. (This may not even be an IDL
> problem. I think it likely that the PostScript Level 2
> specification doesn't allow it, although I don't know this
> to be true.)

Hi David,

PostScript definitely supports 24-bit color, and has for years, but the
IDL driver does not - except for bitmap objects in the PS file.

To do a 24-bit bitmap in PS (this is in the documentation) you do

SET_PLOT, 'PS'
DEVICE, /COLOR, BITS_PER_PIXEL=8 ;Don't forget /COLOR!
image = BYTARR(8L, 8L, 3L) ;Make a tiny image
image[*,*,0L] = 8B ;Set red plane to 8 (08 in hex)
image[*,*,1L] = 10B ;Set green plane to 10 (0A in hex)
image[*,*,2L] = 15B ;Set blue plane to 150 (0F in hex)
TV, image, TRUE = 3L ;Display image interleaved over dim 3
DEVICE, /CLOSE


In the PS file you find:

gsave /rstr 8 string def /gstr 8 string def /bstr 8 string def
12700 12700 scale 8 8 8 [8 0 0 8 0 0]
{ currentfile rstr readhexstring pop} bind
{ currentfile gstr readhexstring pop} bind
{ currentfile bstr readhexstring pop} bind
true 3 colorimage
08080808080808080a0a0a0a0a0a0a0a0f0f0f0f0f0f0f0f080808080808 08080a0a0a0a0a0a0a0a0f0f0f0f0f0f0f0f08080808080808080a0a0a0a
0a0a0a0a0f0f0f0f0f0f0f0f08080808080808080a0a0a0a0a0a0a0a0f0f 0f0f0f0f0f0f08080808080808080a0a0a0a0a0a0a0a0f0f0f0f0f0f0f0f
08080808080808080a0a0a0a0a0a0a0a0f0f0f0f0f0f0f0f080808080808 08080a0a0a0a0a0a0a0a0f0f0f0f0f0f0f0f08080808080808080a0a0a0a
0a0a0a0a0f0f0f0f0f0f0f0f

which is an 8x8 24-bit image.

So one ugly alternative for making 24-bit color plots is to plot to a
24-bit X or Z device, TVRD read the image, switch to PS, TV the image, and
then send the PS file to a color printer.

Regards, Ken

--
Kenneth P. Bowman, Professor 409-862-4060
Department of Meteorology 409-862-4466 fax
Texas A&M University bowmanATcsrp.tamu.edu
College Station, TX 77843-3150 Change the AT to @
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Large Image Handling FAQ?
Next Topic: cancel button to stop w/in an iterative loop?

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

Current Time: Fri Oct 10 22:43:10 PDT 2025

Total time taken to generate the page: 0.80761 seconds