[Image-SIG] Problems with ghostscript

Johannes Radinger JRadinger at gmx.at
Wed May 18 12:26:57 CEST 2011


Hello,

I just installed PIL on my mac osx 10.6.6 under python 2.6.6 and
tried one of your first examples (slightly modified). I tried following
script:

import Image
import PSDraw
im = Image.open("testplot.eps")
title = "lena"
box = (1*72, 2*72, 7*72, 10*72) # in points

ps = PSDraw.PSDraw() # default is sys.stdout
ps.begin_document(title)
# draw the image (75 dpi)
ps.image(box, im, 75)
ps.rectangle(box) 

# draw centered title
ps.setfont("HelveticaNarrow-Bold", 36)
w, h, b = ps.textsize(title)
ps.text((4*72-w/2, 1*72-h), title) 

ps.end_document()


but then I get the error:

Traceback (most recent call last):
  File "/Users/Johannes Radinger/Desktop/Python Scripts/test.py", line 10, in <module>
    ps.image(box, im, 75)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/PSDraw.py", line 105, in image
    EpsImagePlugin._save(im, self.fp, None, 0)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/EpsImagePlugin.py", line 296, in _save
    im.load()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/EpsImagePlugin.py", line 283, in load
    self.im = Ghostscript(self.tile, self.size, self.fp)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/EpsImagePlugin.py", line 75, in Ghostscript
    raise IOError("gs failed (status %d)" % status)
IOError: gs failed (status 32512)


What causes the problem??

/johannes

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone


More information about the Image-SIG mailing list