-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pillow animation writer. #10240
Pillow animation writer. #10240
Conversation
66139b0
to
0479787
Compare
Can we test this? I'm guessing there's not image comparison test, but a smoke test should be possible right? |
@writers.register('pillow') | ||
class PillowWriter(MovieWriter): | ||
@classmethod | ||
def isAvailable(cls): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason this is cls
and not self
? (just asking out of curiosity!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because you need to check whether the class is available before instantiating one (at least that's how the animation framework is setup).
It is smoketested (as much as every other writer...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I've thought about this in the past, so thanks for adding! With this, it's possible to make an animated gif without needing to resort to Imagemagick.
Writing animations with Pillow | ||
`````````````````````````````` | ||
It is now possible to use Pillow as an animation writer. Supported output | ||
formats are currently gif (Pillow>=3.4) and webp (Pillow>=5.0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you include a small example here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me! Thanks
can't wait for v 2.2 |
@@ -117,6 +117,7 @@ def isAvailable(self): | |||
('avconv_file', 'movie.mp4'), | |||
('imagemagick', 'movie.gif'), | |||
('imagemagick_file', 'movie.gif'), | |||
('pillow', 'movie.gif'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to be causing issues on MacOS for some reason. Pillow tests in test_images
have a decorator @needs_pillow
which lets most of the tests pass. This test doesn't, so the tests are now failing.... Of course the underlying issue is that pillow is not being installed properly somehow on macOS...
PR Summary
Closes #10229.
PR Checklist