Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #5936. Ensures that the file pointer duplicated in TiffImagePlugin is closed, rather than counting on libtiff to do it.

# libtiff closes the file descriptor, so pass in a dup.
try:
fp = hasattr(self.fp, "fileno") and os.dup(self.fp.fileno())

I haven't added a test for this, since the issue involves hitting the limit on the number of open files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OSError: [Errno 24] Too many open files for image.save for tiff images

2 participants