fixed reading of EPS pictures

found in: http://www.mail-archive.com/image-sig@python.org/msg03054.html
This commit is contained in:
Tom Gross 2012-04-26 17:00:22 +02:00 committed by Shuge Lee
parent 2b54c9959e
commit 1e120cb951

View File

@ -202,6 +202,10 @@ class EpsImageFile(ImageFile.ImageFile):
self.info[k[:8]] = k[9:] self.info[k[:8]] = k[9:]
else: else:
self.info[k] = "" self.info[k] = ""
elif s[0] == '%':
# handle non-DSC Postscript comments that some
# tools mistakenly put in the Comments section
pass
else: else:
raise IOError, "bad EPS header" raise IOError, "bad EPS header"