Close the image file pointer when done.

This commit is contained in:
Steven Silvester
2014-11-07 15:22:20 +02:00
committed by Stefan van der Walt
parent 4485f6d6c1
commit b5a988a52f
+3
View File
@@ -216,6 +216,9 @@ class ImageCollection(object):
im.seek(i)
except EOFError:
break
if hasattr(im, 'fp') and im.fp:
im.fp.close()
self._frame_index = index
return len(index)