python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
12.32k stars 2.23k forks source link

Do not close provided file handles with libtiff when saving #8458

Closed radarhere closed 1 month ago

radarhere commented 1 month ago

Addresses https://github.com/python-pillow/Pillow/issues/7042#issuecomment-2404653713

7199 made a change to C code so that libtiff did not always close the file handle when decoding an image, removing the need for the file handle to be duplicated in Python.

This makes the save change, but for encoding an image.