4.1.0 (2017-04-03)
Deprecations
Several deprecated items have been removed.
Support for spaces in tiff kwargs in the parameters for ‘x resolution’, ‘y resolution’, ‘resolution unit’, and ‘date time’ has been removed. Underscores should be used instead.
The methods
PIL.ImageDraw.ImageDraw.setink,PIL.ImageDraw.ImageDraw.setfill, andPIL.ImageDraw.ImageDraw.setfonthave been removed.
Other changes
Closing files when opening images
The file handling when opening images has been overhauled. Previously, Pillow would attempt to close some, but not all image formats after loading the image data. Now, the following behavior is specified:
For images where an open file is passed in, it is the responsibility of the calling code to close the file.
For images where Pillow opens the file and the file is known to have only one frame, the file is closed after loading.
If the file has more than one frame, or if it can’t be determined, then the file is left open to permit seeking to subsequent frames. It will be closed, eventually, in the
or methods.