image export works again with Py3 (issue #15)

https://github.com/pdfminer/pdfminer.six/issues/15
pull/55/head
Philippe Guglielmetti 2017-01-20 10:11:19 +01:00
parent f094f0b380
commit 9b9d69aee9
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class ImageWriter(object):
ext = '.%d.%dx%d.img' % (image.bits, width, height)
name = image.name+ext
path = os.path.join(self.outdir, name)
fp = file(path, 'wb')
fp=open(path, 'wb')
if ext == '.jpg':
raw_data = stream.get_rawdata()
if LITERAL_DEVICE_CMYK in image.colorspace:

View File

@ -233,7 +233,7 @@ class PDFStream(PDFObject):
params = [params] * len(filters)
if settings.STRICT and len(params) != len(filters):
raise PDFException("Parameters len filter mismatch")
return zip(filters, params)
return list(zip(filters, params)) #solves https://github.com/pdfminer/pdfminer.six/issues/15
def decode(self):
assert self.data is None and self.rawdata is not None