You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following breaks in pillow 9.0.1 but works fine if I downgrade to pillow 8.4.0. My guess is that the new loader that converts to RGB/RGBA when seeking doesn't account for the possibility of a grayscale GIF.
fromPILimportImageimportnumpyasnpimg=Image.open("gray_test.gif")
im1=np.asarray(img) # just showing that the first frame worksimg.seek(2) # break
Stack Trace:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Sebastian\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\GifImagePlugin.py", line 133, in seek
self._seek(f)
File "C:\Users\Sebastian\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\GifImagePlugin.py", line 151, in _seek
self.load()
File "C:\Users\Sebastian\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\ImageFile.py", line 264, in load
self.load_end()
File "C:\Users\Sebastian\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\GifImagePlugin.py", line 371, in load_end
self.im.putpalettealpha(self._frame_transparency, 0)
ValueError: image has no palette
Picture for testing:
The text was updated successfully, but these errors were encountered:
The following breaks in pillow 9.0.1 but works fine if I downgrade to pillow 8.4.0. My guess is that the new loader that converts to RGB/RGBA when seeking doesn't account for the possibility of a grayscale GIF.
Stack Trace:
Picture for testing:
The text was updated successfully, but these errors were encountered: