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

Home » Public Forums » archive » Re: Generating PS files and png files at the same time
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: Generating PS files and png files at the same time [message #33275 is a reply to message #33272] Tue, 17 December 2002 10:10 Go to previous messageGo to previous message
mvukovic is currently offline  mvukovic
Messages: 63
Registered: July 1998
Member
"Isa Usman" <eepisu@bath.ac.uk> wrote in message news:<atmvsu$oeq@newton.cc.rl.ac.uk>...
> Hello,
>
> Is there a way to generate png files without calling the device procedure
> every time? It's just that every time I plot something I would like a
> postscript and a png copy.
>
> Thanks in advance.
>
> Isa

I use ghostscript for that. you can find it using google. You can
run it from the command line, or equivalently, spawn a shell command.

A simple version for windows would be:
gswin32c -sDEVICE=png256 -r300 -dBATCH -dNOPAUSE -q
-sOutputFile=output.png input.eps

And this is a snippet from my makefile for making png's from eps's (I
use Cygwin for a bash shell in windows, and good chunks of this code
are due to stuff I found on the web)
bbox=`cat $< | tr '\015' ' ' | head -100 | egrep "^%%BoundingBox" |
head -1 | sed -e 's/%%BoundingBox://g''` ;\
width=`echo $$bbox | awk '{printf("%i\n",$$3)}'` ;\
height=`echo $$bbox | awk '{printf("%i\n",$$4)}'` ;\
$(GS) -sDEVICE=png256 -r300 -dBATCH -dNOPAUSE -q
-dDEVICEWIDTHPOINTS=$$width -dDEVICEHEIGHTPOINTS=$$height
-sOutputFile=$@ $<

Hope this helps,

Mirko
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Windows Question Related to IDL
Next Topic: IDLDE refresh in Windows XP (IDL 5.2.1)

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

Current Time: Thu Oct 09 21:58:32 PDT 2025

Total time taken to generate the page: 0.08434 seconds