1
0
Fork 0
forked from josch/img2pdf

close cStringIO and PIL.Image

This commit is contained in:
josch 2015-02-16 19:19:49 +01:00
parent 90e954dc0a
commit e810f3baf4

View file

@ -309,7 +309,10 @@ def convert(images, dpi=None, x=None, y=None, title=None, author=None,
debug_out("Converting colorspace %s to RGB"%color, verbose) debug_out("Converting colorspace %s to RGB"%color, verbose)
imgdata = imgdata.convert('RGB') imgdata = imgdata.convert('RGB')
color = imgdata.mode color = imgdata.mode
imgdata = zlib.compress(imgdata.tostring()) img = imgdata.tobytes()
imgdata.close()
imgdata = zlib.compress(img)
im.close()
# pdf units = 1/72 inch # pdf units = 1/72 inch
if not x and not y: if not x and not y: