Close the image file pointer when done.

This commit is contained in:
Steven Silvester authored and Stefan van der Walt committed 2014-11-07 15:22:20 +02:00
1 parent 4485f6d6c1
commit b5a988a52f
1 file changed
+3
+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)