[Image-SIG] Broken pipe converting eps to png using PIL

LL Lbrannma at yahoo.com
Sat Oct 17 14:38:38 CEST 2009

Hi.. here is an update regarding my eps to png problem. I am running XP... and discovered that my AFPL Ghostscript executable is entitled gswin32 rather than gs. I edited the PIL file EpsImagePlugin.py file (see below) but still have the same problem. Probably my thinking was incorrect.. since converting from .jpg to .png via the PIL (file.open then save) works fine. Perhaps there is a separate Ghostview within Python 2.6,... but I searched for gs.exe in my Python installation directory and did not find anything. I'm still puzzled

  File "C:\Python26\lib\site-packages\PIL\EpsImagePlugin.py", line 72, in Ghostscript
IOError: [Errno 32] Broken pipe
  ----- Original Message ----- 
  From: LL 
  To: image-sig at python.org 
  Sent: Friday, October 16, 2009 12:52 AM
  Subject: [Image-SIG] Broken pipe converting eps to png using PIL

  Hi.. all of the following code executes interactively except the last line. Converting a .jpg file to .png works fine. I'm using the PIL version for Python 2.6. Any suggestions will be greatly appreciated. Thanks, Lance
  PythonWin 2.6.3 (r263:75183, Oct  5 2009, 14:41:55) [MSC v.1500 32 bit (Intel)] on win32.
  Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
  >>> import os
  >>> import zlib
  >>> import Image
  >>> os.chdir("c:\\foo")
  >>> img = Image.open("foo1.eps")
  >>> img.save("foo1.png")
  Traceback (most recent call last):
    File "<interactive input>", line 1, in <module>
    File "C:\Python26\lib\site-packages\PIL\Image.py", line 1372, in save
    File "C:\Python26\lib\site-packages\PIL\EpsImagePlugin.py", line 283, in load
      self.im = Ghostscript(self.tile, self.size, self.fp)
    File "C:\Python26\lib\site-packages\PIL\EpsImagePlugin.py", line 72, in Ghostscript
  IOError: [Errno 32] Broken pipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20091017/d112ed67/attachment.htm>

More information about the Image-SIG mailing list