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

Home » Public Forums » archive » Re: idl, postscript, color
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: idl, postscript, color [message #7286] Wed, 23 October 1996 00:00
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Klaus Bramstedt wrote:
> I have to plot TrueColor pictures in IDL. These pictures contain colors
> defined as RGB-values. On a TrueColor X-Display everything works fine
> with about 16 million colors, i get very nice pictures. I want to plot
> this pictures on a PostScript color printer. But the 'ps' device in IDL
> only allows 256 colors, which is definitily too less for my pictures.
> Has someone any idea, how to put my pictures on paper?

See the IDL Reference Manual section on 'The Postscript Device',
in particular the section on 'True-Color Images', which says in part

(begin quote)
Use the TRUE keyword to the TV and TVSCL procedures to indicate that the
image is a true-color image and to specify the dimension over which
color is interleaved. A value of 1 specifies pixel interleaving, 2 is
row interleaving, and 3 is image interleaving. The following example
writes a 24-bit image, interleaved over the 3rd dimension, to a
PostScript file:

SET_PLOT, 'PS'
;Set the PostScript device to *8* bits per color, not 24:
DEVICE, FILE='24bit.ps', /COLOR, BITS=8
TV, [[[r]], [[g]], [[b]]], TRUE=3
DEVICE, /CLOSE
(end quote)
Re: idl, postscript, color [message #7288 is a reply to message #7286] Wed, 23 October 1996 00:00 Go to previous message
agraps is currently offline  agraps
Messages: 35
Registered: September 1994
Member
Klaus Bramstedt <bram@gome5.physik.uni-bremen.de> writes:

> I have to plot TrueColor pictures in IDL. These pictures contain colors
> defined as RGB-values. On a TrueColor X-Display everything works fine
> with about 16 million colors, i get very nice pictures. I want to plot
> this pictures on a PostScript color printer. But the 'ps' device in IDL
> only allows 256 colors, which is definitily too less for my pictures.
> Has someone any idea, how to put my pictures on paper?

(posted and emailed)

I'm not sure, but I do the following to get a color postscript file
from the image stored in the Zbuffer. What happens if you change the
bits from 8 to something larger? It might be worth a try. But I would
hope that 2^{24} colors would be enough (for 8 bit colors, each color
coordinate can range from 0 to 255, so the total palette contains
16,777,216 colors. See page 16-7 in the IDL User's Guide.).

SET_PLOT, 'Z', /copy
;copy the device's internal color table
a = TVRD()
SET_PLOT, 'PS', /copy
fn = '/home0/amara/temp.ps'
DEVICE, filename=fn, /color ,/landscape, bits=8
TV, a
DEVICE, /close

Amara

--

************************************************************ *************
Amara Graps email: agraps@netcom.com
Computational Physics vita: finger agraps@best.com
Multiplex Answers URL: http://www.amara.com/
************************************************************ *************
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Wanted: optical ray tracing
Next Topic: Lottery Information

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

Current Time: Sat Oct 11 08:38:55 PDT 2025

Total time taken to generate the page: 0.88041 seconds