Pillow 11.0.0 and Django: TiffImagePlugin raised 'Invalid dimensions' error
Seems that v11.0.0 release add a Bug parsing tiff images:
... File "django/core/files/images.py", line 63, in get_image_dimensions p.feed(data) File "PIL/ImageFile.py", line 471, in feed im = Image.open(fp) File "PIL/Image.py", line 3515, in open im = _open_core(fp, filename, prefix, formats) File "PIL/Image.py", line 3503, in _open_core im = factory(fp, filename) File "PIL/TiffImagePlugin.py", line 1153, in __init__ super().__init__(fp, filename) File "PIL/ImageFile.py", line 144, in __init__ self._open() File "PIL/TiffImagePlugin.py", line 1177, in _open self._seek(0) File "PIL/TiffImagePlugin.py", line 1248, in _seek self._setup() File "PIL/TiffImagePlugin.py", line 1426, in _setup raise ValueError(msg)
more info in Sentry message:
Runtime: CPython v3.11.10(3.11.10 (main, Oct 19 2024, 01:04:28) [GCC 12.2.0])
It works with Pillow 10.4.0
