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

Christian M. Jensen christianj at implicitnetworks.com
Thu Sep 1 18:20:21 CEST 2005

I have run into the same situation before for another client.

I used Visual Basic to control Photoshop. I put an HTTP server inside VB
and had it serve up requests. VB supports EPS and PDF nicely.


This would open up the file with the name "image.[supported_extension]
and make a thumbnail out of it and send it back as a "output_extension"
I used MIME headers in the HTTP stream to have it render properly.

The resize mode made it so that I could request any image back at any
size and stretch, fit inside a given box or fill a box (maintaining
proportions by trimming)

I also had it so that they could request the base image as well.

I don't have the code any more :( nor could I give it out :(

Good Luck!

-----Original Message-----
From: image-sig-bounces at python.org [mailto:image-sig-bounces at python.org]
On Behalf Of Stefano Masini
Sent: Thursday, September 01, 2005 8:25 AM
To: image-sig at python.org
Subject: Re: [Image-SIG] Read EPS (bitmap and vector),TIFF and PSD on

On 9/1/05, Fredrik Lundh <fredrik at pythonware.com> wrote:
> I'm not sure I see the connection -- the EPS plugin simply looks for
> EPS headers, and if found, tells ghostscript to render it to a

Here's what I got:

File "/usr/lib/python2.4/site-packages/PIL/EpsImagePlugin.py", line
75, in Ghostscript
    im = Image.core.open_ppm(file)
IOError: error when accessing file

Then I figured that for some reason gs was failing to write the
temporary file called "file".
So I printed the gs command line invocation, that looks like this:

gs -q -g142x155 -dNOPAUSE -dSAFER -sDEVICE=ppmraw
-sOutputFile=/tmp/tmpNJ2UG_ - >/dev/tty 2>/dev/tty

I tried to figure out if there could be something wrong. Since I don't
know ghostscript very well, I typed man gs, and got around a bit.
Enough to discourage me to go any further! ;)

So I though gs must be a complicated beast... I'm wondering if I'm
doing something wrong or my image is simply awful.

> (feel free to mail me a copy of your worst-case EPS file, btw.  my
> internal PIL test suite can never have too many samples...).

Sure! Thanks a lot.

Image-SIG maillist  -  Image-SIG at python.org

More information about the Image-SIG mailing list