Since release of Pillow 11.0, I have a problem rotating some files using Pillow.
What did you expect to happen?
rotated image to be produced in rotated_img
What actually happened?
ZeroDivisionError due to nan in GPS data.
What are your OS, Python and Pillow versions?
OS: Linux
Python: 3.11
Pillow: 11.0
Please paste here the output of running: python3 -m PIL.report
--------------------------------------------------------------------
Pillow 11.0.0
Python 3.11.10+ (heads/3.11:8b275e7, Sep 9 2024, 18:31:31) [GCC 13.2.0]
--------------------------------------------------------------------
Python executable is /home/bashir/mindee/teamMindee/input-pipeline/venv/bin/python3
Environment Python files loaded from /home/bashir/mindee/teamMindee/input-pipeline/venv
System Python files loaded from /home/bashir/.pyenv/versions/3.11-dev
--------------------------------------------------------------------
Python Pillow modules loaded from /home/bashir/mindee/teamMindee/input-pipeline/venv/lib/python3.11/site-packages/PIL
Binary Pillow modules loaded from /home/bashir/mindee/teamMindee/input-pipeline/venv/lib/python3.11/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 11.0.0
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.13.2
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.4.0
--- JPEG support ok, compiled for libjpeg-turbo 3.0.4
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.3
--- LIBTIFF support ok, loaded 4.6.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.1, fribidi 1.0.13, harfbuzz 10.0.1
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------
from PIL.ImageOps import exif_transpose
from PIL.Image import open as pil_open
filepath = "/path/to/file.jpg"
with pil_open(filepath) as pillow_img:
rotated_img = exif_transpose(pillow_img)
What did you do?
Thank you for this amazing library <3.
Since release of Pillow 11.0, I have a problem rotating some files using Pillow.
What did you expect to happen?
rotated image to be produced in rotated_img
What actually happened?
ZeroDivisionError due to nan in GPS data.
What are your OS, Python and Pillow versions?
output.jpg.tar.gz