Re: Generating PS files and png files at the same time [message #33272] |
Tue, 17 December 2002 12:27  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
"Mirko Vukovic" <mvukovic@taz.telusa.com> wrote in message
news:d96c8f7c.0212171010.4d95b8be@posting.google.com...
> 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=$@ $<
Whoa! You've been in the sun too long!
Let's just say that if God meant us to use all that $$ \ | stuff, he
wouldn't have invented FORMAT='(F10.1)'.
--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|
|
Re: Generating PS files and png files at the same time [message #33282 is a reply to message #33275] |
Tue, 17 December 2002 05:33   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Isa Usman (eepisu@bath.ac.uk) writes:
> 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.
This doesn't seem all that environmentally friendly to
me, but if you *really* need it, you can draw all your
plots in FSC_Window, rather than in normal windows.
Then you can output to JPEG, PNG, TIFF, BMP, PICT and
PostScript files with a push of a button.
IDL> fsc_window, 'plot', findgen(11)
Find the required files here:
http://www.dfanning.com/programs/fsc_window.zip
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Generating PS files and png files at the same time [message #33337 is a reply to message #33272] |
Wed, 18 December 2002 13:15  |
mvukovic
Messages: 63 Registered: July 1998
|
Member |
|
|
"Mark Hadfield" <m.hadfield@niwa.co.nz> wrote in message news:<ato3h8$at4$2@newsreader.mailgate.org>...
> "Mirko Vukovic" <mvukovic@taz.telusa.com> wrote in message
> news:d96c8f7c.0212171010.4d95b8be@posting.google.com...
>> 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=$@ $<
>
> Whoa! You've been in the sun too long!
>
Nope, just in my cube :-). But you really should not look too harshly
at the code above. It is only programming, just of a different
flavor.
Mirko
|
|
|
Re: Generating PS files and png files at the same time [message #33356 is a reply to message #33272] |
Wed, 18 December 2002 03:22  |
David Burridge
Messages: 33 Registered: January 1998
|
Member |
|
|
"Mark Hadfield" <m.hadfield@niwa.co.nz> wrote in message
news:ato3h8$at4$2@newsreader.mailgate.org...
> "Mirko Vukovic" <mvukovic@taz.telusa.com> wrote in message
> news:d96c8f7c.0212171010.4d95b8be@posting.google.com...
>> 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=$@ $<
>
> Whoa! You've been in the sun too long!
>
> Let's just say that if God meant us to use all that $$ \ | stuff, he
> wouldn't have invented FORMAT='(F10.1)'.
Assuming God invented Fortran of course? (and we *don't* want to go
there!!!!) !-)
Dave
--
David Burridge
Burridge Computing, 18 The Green South
Warborough, Oxon, OX10 7DN
England
Tel: +44 (0) 1865 858279, Email: davidb@burridgecomputing.co.uk
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 15/10/2002
|
|
|