From 1112ad67a35eb25d0363d68227fbbb3eea9f2b36 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 4 Aug 2022 14:18:31 +1000 Subject: [PATCH 1/2] Document that orientation data is removed by exif_transpose() --- src/PIL/ImageOps.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py index 48b41d87fda..44214fead5e 100644 --- a/src/PIL/ImageOps.py +++ b/src/PIL/ImageOps.py @@ -572,8 +572,11 @@ def solarize(image, threshold=128): def exif_transpose(image): """ - If an image has an EXIF Orientation tag, return a new image that is - transposed accordingly. Otherwise, return a copy of the image. + If an image has an EXIF Orientation tag return a new image that is + transposed accordingly. The new image will have the orientation data + removed. + + Otherwise, return a copy of the image. :param image: The image to transpose. :return: An image. From 1197e1998214ca54e41772d2f804b02e528a7bab Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 4 Aug 2022 14:19:17 +1000 Subject: [PATCH 2/2] Document that exif_transpose() does not change orientations of 1 --- src/PIL/ImageOps.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py index 44214fead5e..0c3f900caac 100644 --- a/src/PIL/ImageOps.py +++ b/src/PIL/ImageOps.py @@ -572,9 +572,9 @@ def solarize(image, threshold=128): def exif_transpose(image): """ - If an image has an EXIF Orientation tag return a new image that is - transposed accordingly. The new image will have the orientation data - removed. + If an image has an EXIF Orientation tag, other than 1, return a new image + that is transposed accordingly. The new image will have the orientation + data removed. Otherwise, return a copy of the image.