Cut and paste an EPS file

J

John Henry

I am looking for a Python tookit that will enable me to cut section of
a picture out from an EPS file and create another EPS file.

I am using a proprietary package for doing certain engineering
calculations. It creates single page x-y line plots that has too much
blank spaces around the plotted area located at the top 2/3 of the
page. I like to be "cut" that white space out by extracting the image
out and may be scale it up - while keeping the bottom 1/3 unchanged.

Does anybody has any suggestions?

Thanks,
 
B

Ben Caradoc-Davies

John said:
I am looking for a Python tookit that will enable me to cut section of
a picture out from an EPS file and create another EPS file.
I am using a proprietary package for doing certain engineering
calculations. It creates single page x-y line plots that has too much
blank spaces around the plotted area located at the top 2/3 of the
page. I like to be "cut" that white space out by extracting the image
out and may be scale it up - while keeping the bottom 1/3 unchanged.
Does anybody has any suggestions?

Hack the %%BoundingBox line in the EPS file. The importing application
should honour this when determining the limits ofthe figure. See

http://www.cs.indiana.edu/docproject/programming/postscript/eps.html

and Google for more.

%%BoundingBox coordinates are integers and are in points.
 
J

John Henry

Thanks for the reply.

Yes, that would have been too easy :=)

If I change the bbox, I would cut out the lower 1/3 of the plot. I
only want to apply it to the top 2/3 of the page.

Regards,
 
L

Larry Bates

There is a python iterface to imagemagik that might work. I haven't
used it, just read about it.

-Larry Bates
 
P

Piet van Oostrum

John Henry said:
JH> I am looking for a Python tookit that will enable me to cut section of
JH> a picture out from an EPS file and create another EPS file.
JH> I am using a proprietary package for doing certain engineering
JH> calculations. It creates single page x-y line plots that has too much
JH> blank spaces around the plotted area located at the top 2/3 of the
JH> page. I like to be "cut" that white space out by extracting the image
JH> out and may be scale it up - while keeping the bottom 1/3 unchanged.

If you just want to remove the spurious whitespace (i.e. crop the picture)
you can do this with ghostscript. Look for a script ps2eps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top