Removed usage of a deprecated method in Pillow.