mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-18 12:40:14 +08:00
Close the image file pointer when done.
This commit is contained in:
committed by
Stefan van der Walt
parent
4485f6d6c1
commit
b5a988a52f
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user