-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image.load() does not close file pointer #1144
Comments
It's not False, the attribute is missing:
I agree this is wonky. |
Yes, the file pointer is deleted from img object, but if you copy the reference, you can still see that its there and open. |
Ah! OK marked as bug, thanks. |
I can replicate this on OS X, so it's not just Windows. I wrote a patch so that the file pointer would close, but I then found that the seek method in GifImagePlugin uses the file pointer after calling load() |
Same as #835? |
The code in the first comment now passes: from PIL import Image
img = Image.open(path)
fp = img.fp
img.load()
fp.closed # was False in original report, but is now True System:
See also #835 (comment). |
I'm doing this:
Expected file pointer to be closed.
System:
The text was updated successfully, but these errors were encountered: