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 #14540 is a reply to message #14529] Tue, 09 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 <36E582B4.E3E8863D@ssec.wisc.edu>, Liam Gumley
<Liam.Gumley@ssec.wisc.edu> wrote:

> David Fanning wrote:
>> Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes:
>>> I guess I'm not sure I understand the problem. I'm able to display true
>>> color images with colored graphics overlays; I've attached a Postscript
>>> example to this message. The postscript file includes 6 test images.
>>> Images 2, 4, and 6 are true color (24 bit) with colored lines (axes,
>>> title, colorbar) overlaid. I've also attached a JPEG version that was
>>> created from the postscript (using ImageMagick).

I think you can use *colors* in the "PLOT" part of the program, but not
256^3 *different* colors (i.e., 24-bit).

Here's an example of a program that works great on a 24-bit X display, but
does not produce the appropriate color PS output. (No bitmaps involved.)

PRO TEST24, PRINT = print

IF KEYWORD_SET(print) THEN BEGIN
SET_PLOT, 'PS'
DEVICE, /COLOR, BITS_PER_PIXEL = 8, /SCHOOLBOOK, FONT_SIZE=10, /PORTRAIT
!P.FONT = 0L ;Use hardware fonts
ENDIF
PRINT, !P.BACKGROUND

n = 1000L
x = RANDOMU(seed, n)
y = RANDOMU(seed, n)
r = LONG(255*x)
g = LONG(255*y)
b = REPLICATE(0B, n)

PLOT, [0,0], [1,1], /NODATA
PLOTS, x, y, PSYM=1, COLOR = r + 256L*(g + 256L*b)

HELP, /DEVICE
HELP, !P, /STRUCT
HELP, !D, /STRUCT
TVLCT, r, g, b, /GET
PRINT, r, g, b

IF KEYWORD_SET(print) THEN DEVICE, /CLOSE
SET_PLOT, 'X'
!P.FONT = -1L ;Use Hershey fonts

END

--
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: Sat Oct 11 00:28:00 PDT 2025

Total time taken to generate the page: 1.44239 seconds