Fix for #653 - animated gifs with mode "P" errors#657
Fix for #653 - animated gifs with mode "P" errors#657benzkji wants to merge 1 commit intoSmileyChris:masterfrom
Conversation
|
@jrief @SmileyChris to be clear, this is an somewhat urgent bugfix, for a regression (see #653 ) that was introduced by my animated formats support PR that was merged for version 2.10. THUMBNAIL_PRESERVE_ANIMATIONS is for later. |
|
Can we expect this PR to be merged soon and a release to be published, please? |
|
Let's see if @SmileyChris or @jrief see this. |
|
@benzkji Quick question about this fix: I noticed that the resulting thumbnail is not animated for animated mode P GIFs. You can see this by replacing the last line in the test with this: # ...
thumb = t.get_thumbnail({'size': (500, 50), 'crop': True})
self.assertTrue(getattr(thumb.image, "is_animated", False))It looks like I've set I've also tested with animated PNGs and that is working. Any idea? |
|
@benkonrath yes. It is the workaround. I've not found a way to correctly process the example GIF from this PR, so I thought, better strip animations and have something working. I was not able to spend a lot of time on the problem though, I'm sure there is a solution. But Pillow is sometimes tricky, I must admit. |
@jrief @SmileyChris somehow the FrameAware wrapper did not always preserve the mode.
I was thinking about adding a "THUMBNAIL_PRESERVE_ANIMATIONS = False", so one can easily completly disable animated stuff. Even when not saving the frames, they are currently processed anyway, thus running into potential performance issues.