Re: Polyfill, z-buffer & postscript [message #33785] |
Mon, 27 January 2003 13:13 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Craig Markwardt" wrote >
> "Isa Usman" writes:
>
>> Hi,
>>
>> I am using polyfill to plot radar scans directly to postscript. The
>> resulting files are quite big (~1MB) and I need to make them smaller.Is
>> there a simple way?
>>
>> I thought about using the z-buffer to do the plotting then saving it to
>> postscript like this
>
> You are rendering your graph to the Z buffer, then doing a screen
> capture. Of course the result will be a large file! Also, you lose
> graphical fidelity, since the Z buffer will be pixelated at some
> coarse density, while any postscript printer will have a much higher
> resolution.
>
> Why don't you render your plot directly to the Postscript device, and
> skip the Z buffer stage?
I think the poster *is* plotting directly. Isa tried the z-buffer/TVRD
route but had color issues (David Fanning's website www.dfanning.com has a
tip section that covers this and many other common problems, BTW).
I don't think a ~1 MB .ps file is that out of the ordinary. I would guess
that your polyfill is represented in a similar fashion as a bitmap in your
.ps file which is the reason for the hefty file size. You could verify this
by commenting out your call(s) to polyfill and checking the resulting .ps
file size. If my hunch is right it will be much smaller.
Regardless if polyfill is the culprit or not, you still have a big file. If
you aren't opposed to a different format you might want to try pushing the
.ps files thru ps2pdf (which ships with the ghostscript package) using
spawn. Alternatively you could compress them with gzip or similar program.
Both of these approaches should better than halve the size of your files.
-Rick
|
|
|
Re: Polyfill, z-buffer & postscript [message #33787 is a reply to message #33785] |
Mon, 27 January 2003 11:57  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
"Isa Usman" <eepisu@bath.ac.uk> writes:
> Hi,
>
> I am using polyfill to plot radar scans directly to postscript. The
> resulting files are quite big (~1MB) and I need to make them smaller.Is
> there a simple way?
>
> I thought about using the z-buffer to do the plotting then saving it to
> postscript like this
You are rendering your graph to the Z buffer, then doing a screen
capture. Of course the result will be a large file! Also, you lose
graphical fidelity, since the Z buffer will be pixelated at some
coarse density, while any postscript printer will have a much higher
resolution.
Why don't you render your plot directly to the Postscript device, and
skip the Z buffer stage?
Good luck,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|