image export works again with Py3 (issue #15)
https://github.com/pdfminer/pdfminer.six/issues/15pull/55/head
parent
f094f0b380
commit
9b9d69aee9
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue