[Image-SIG] Read EPS (bitmap and vector), TIFF and PSD on windows

Fredrik Lundh fredrik at pythonware.com
Thu Sep 1 15:48:41 CEST 2005


Stefano Masini wrote:

> So, is it possible to use the gimp as a simple backend? I mean, wrap
> some functionality inside a pythonic api, so that I can do stuff like:
> open('foo.eps').save('preview.jpeg') ?

have you tried installing PIL and doing

import Image
Image.open('foo.eps').save('preview.jpeg')

or, better

import Image
im = Image.open('foo.eps')
im.thumbnail((100, 100), Image.ANTIALIAS)
im.save('preview.jpeg')

?  it should work for most of your files, at least.  you may have
to add fallback paths for some kinds of data (e.g. non-EPS post-
script files and ccitt-encoded TIFF files; run "gs" and "tiffcp" to
turn them into a format that PIL can handle)

</F> 





More information about the Image-SIG mailing list