Re: image manipulation to postscript [message #7907] |
Mon, 27 January 1997 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Runar J�rgensen <runarj@fys.uio.no> writes:
> My application is designed, by request, to manipulate data displayed as
> images. Manipulation is done with the tools Xloadct, and Xpalette.
> And then the manipulated image is "saved" in a selected format and
> then printed on request. Works splendid if you want to save it as TIFF,
> GIF or JPEG.
>
> But with postscript there is a problem with the quality of the rendering.
> What I tried to do was to read of the display area with tvrd() (check code
> sample below), to be sure I got the manipulated image. But the result
> compared to printing the original data array as postscript was worse than
> I'd hope for. My guess is that it's effect of reading of the display
> buffer. Letters get "edgy". Background is black. Contrast is high. Not
> very much comparable to a direct postscript rendering of an array.
I think the problem you are having with PostScript here comes about
because of the way you are setting up the PostScript device. In
particular, you need to set the BITS_PER_PIXEL keyword equal
to 8 if you want to get full 256 colors or gray-scales. I think
that's why your contrast is high.
I have a series of 13 articles on creating Perfect PostScript
Output on my web page. I think you would be interested in
looking at several of them.
> Is there away to get a postscript rendering of the manipulatied array
> without the use of tvrd() first?
Yes, absolutely. It is the fact that you are doing the TVRD that
is causing the black background. It seems to me you are
trying to draw an image with some axes on it. Here is
how I would do it:
SET_PLOT, 'PS', /INTERPOLATE
DEVICE, /LANDSCAPE, COLOR=1, BITS_PER_PIXEL=8
TVIMAGE, image, POSITION=[0.1, 0.1, 0.9, 0.9]
CONTOUR, image, /NOERASE, /NODATA, POSITION=[0.1, 0.1, 0.9, 0.9], $
XSTYLE=1, YSTYLE=1
You can download TVIMAGE from my web page. I wrote it for
exactly this purpose. :-)
Cheers!
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
|
|
|