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

Home » Public Forums » archive » reduce the size of eps
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
reduce the size of eps [message #49848] Wed, 23 August 2006 05:58 Go to next message
Steve.Morris@libero.i is currently offline  Steve.Morris@libero.i
Messages: 12
Registered: March 2006
Junior Member
Hi there (sorry for the cross-posting),

I have some eps plot (done with IDL, some of them in colours) that are
far too big.

I should upload them on online archive server and I have to resize
them. I have tried something like the following command (I'm using
linux)

gs -r300 -dEPSCrop -dTextAlphaBits=4 -sDEVICE=png16m
-sOutputFile=fig.png -dBATCH -dNOPAUSE fig.eps

but it does not work.

I was wondering if there's any tip or trick to reduce the size of the
eps file to be used in a latex file.
I have opened the eps file with text editor and canceled the %% lines.
That reduce the size of almost nothing :(
Apparently IDL is clever and there aren't any redundant fonts ...

I would also be interested in know if there's any command to give IDL
in order to produce file with lower dimension (maybe a good compromise
between quality and size...)

Thanks a lot!
s.
Re: reduce the size of eps [message #49971 is a reply to message #49848] Wed, 23 August 2006 13:57 Go to previous message
Marshall Perrin is currently offline  Marshall Perrin
Messages: 44
Registered: December 2005
Member
michael <Steve.Morris@libero.it> wrote:
> Hi there (sorry for the cross-posting),
>
> I have some eps plot (done with IDL, some of them in colours) that are
> far too big.
>
> I should upload them on online archive server and I have to resize
> them. I have tried something like the following command (I'm using
> linux)
>
> gs -r300 -dEPSCrop -dTextAlphaBits=4 -sDEVICE=png16m
> -sOutputFile=fig.png -dBATCH -dNOPAUSE fig.eps
>
> but it does not work.

I have successfully used basically that exact same command line, only
I used -sDEVICE=jpeg instead of png16m. Not sure if that would make a
difference or not.

I presume this is for arxiv.org, in which case you may want to check out
the automated arxiv submission preparation script I wrote a while ago:
http://astro.berkeley.edu/~mperrin/submit_prepare.pl
It takes a LaTeX file and automatically compresses all the EPS files
included from that LaTeX file, then tars up the whole bunch for
easy upload. But then again, if the above command line isn't working
for you, I don't know why my script would be more successful, since
that's what it does internally.

- Marshall
Re: reduce the size of eps [message #49980 is a reply to message #49848] Wed, 23 August 2006 10:59 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <1156350060.560019.62110@b28g2000cwb.googlegroups.com>,
"David Streutker" <stredavi@isu.edu> wrote:

> Maarten wrote:
> I've got it on 6.2, but had to search for it. It's not listed in the
> index.

Ah, a documentation problem, I found it in the list of all DEVICE keywords, but
it is not in the list of keywords accepted by the PostScript device. :-(

I see that this has not fixed the limitation on 24-bit color plots (24-bit color
for images only). Too bad. I waste more time working around that than any
other IDL problem I can think of.

Ken
Re: reduce the size of eps [message #49983 is a reply to message #49848] Wed, 23 August 2006 09:21 Go to previous message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
Maarten wrote:
> Kenneth Bowman wrote:
>> In article <1156340379.315739.85190@74g2000cwt.googlegroups.com>,
>> "Maarten" <maarten.sneep@knmi.nl> wrote:
>>
>>> Have you tried to set some keywords to the device call:
>>> set_plot, "PS"
>>> device, LANGUAGE_LEVEL=2, /encapsulated
>>>
>>> PS level 2 should be a lot smaller than the default level 1.
>>>
>>> Maarten
>>
>> I'm trying to find this keyword in the documentation and can't. Any idea when
>> it was added? I thought the PS device driver hadn't changed in years.
>
> I'm on 6.3, but I think it was present in 6.1 already (never used
> anything before 6.1).
>
> Maarten

I've got it on 6.2, but had to search for it. It's not listed in the
index.
Re: reduce the size of eps [message #49986 is a reply to message #49848] Wed, 23 August 2006 08:45 Go to previous message
Helge Blischke is currently offline  Helge Blischke
Messages: 1
Registered: August 2006
Junior Member
Craig Markwardt wrote:
> "michael" <Steve.Morris@libero.it> writes:
>
>
>
>> Hi there (sorry for the cross-posting),
>>
>> I have some eps plot (done with IDL, some of them in colours) that are
>> far too big.
>>
>> I should upload them on online archive server and I have to resize
>> them. I have tried something like the following command (I'm using
>> linux)
>
>
> Do you have the "convert" command on your linux machine? Most modern
> Linuces do have it. I think it is part of the ImageMagick package.
> Usually this command,
>
> convert fig.eps fig.png
>
> will do the trick, and then you can futz with the output size (-size)
> if you need to. For a preprint server, the quality only needs to be
> good enough to be legible, not perfect for publication, so you can
> usually scale down the output image.
>
> Sometimes when I do things by hand, I open the PS figure in ghostview,
> and then capture and save it using "xv".
>
> Good luck!
> Craig
>

Instead of doing trial and error ad ibnfinitum, please post (an URL to) a
sample file so that we can have a look into it and possibly make
a proposal on that experience.

Helge


--
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
Re: reduce the size of eps [message #49987 is a reply to message #49848] Wed, 23 August 2006 08:29 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"michael" <Steve.Morris@libero.it> writes:


> Hi there (sorry for the cross-posting),
>
> I have some eps plot (done with IDL, some of them in colours) that are
> far too big.
>
> I should upload them on online archive server and I have to resize
> them. I have tried something like the following command (I'm using
> linux)

Do you have the "convert" command on your linux machine? Most modern
Linuces do have it. I think it is part of the ImageMagick package.
Usually this command,

convert fig.eps fig.png

will do the trick, and then you can futz with the output size (-size)
if you need to. For a preprint server, the quality only needs to be
good enough to be legible, not perfect for publication, so you can
usually scale down the output image.

Sometimes when I do things by hand, I open the PS figure in ghostview,
and then capture and save it using "xv".

Good luck!
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: reduce the size of eps [message #49989 is a reply to message #49848] Wed, 23 August 2006 08:20 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
Kenneth Bowman wrote:
> In article <1156340379.315739.85190@74g2000cwt.googlegroups.com>,
> "Maarten" <maarten.sneep@knmi.nl> wrote:
>
>> Have you tried to set some keywords to the device call:
>> set_plot, "PS"
>> device, LANGUAGE_LEVEL=2, /encapsulated
>>
>> PS level 2 should be a lot smaller than the default level 1.
>>
>> Maarten
>
> I'm trying to find this keyword in the documentation and can't. Any idea when
> it was added? I thought the PS device driver hadn't changed in years.

I'm on 6.3, but I think it was present in 6.1 already (never used
anything before 6.1).

Maarten
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL scale property
Next Topic: Reading HDF5 signed bytes gives strange results

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

Current Time: Wed Oct 08 15:13:42 PDT 2025

Total time taken to generate the page: 0.00739 seconds