Cut and paste an EPS file
Ben Caradoc-Davies
ben at wintersun.org
Fri Dec 2 18:35:41 EST 2005
John Henry wrote:
> 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.
--
Ben Caradoc-Davies <ben at wintersun.org>
http://wintersun.org/
"Those who deny freedom to others deserve it not for themselves."
- Abraham Lincoln
More information about the Python-list
mailing list