diff options
author | ayleph <ayleph@thisshitistemp.com> | 2015-12-17 21:06:42 -0500 |
---|---|---|
committer | Boris Bobrov <breton@cynicmansion.ru> | 2015-12-20 00:51:13 +0300 |
commit | 6e38fec80ebaadc3b3cfdc912f40cc4e8bb9b31c (patch) | |
tree | c7e98c0e3c488df2453164810e0a303f0be1d73d | |
parent | e2a8d303071dc3701436a8a28701e4659ddf5784 (diff) | |
download | mediagoblin-6e38fec80ebaadc3b3cfdc912f40cc4e8bb9b31c.tar.lz mediagoblin-6e38fec80ebaadc3b3cfdc912f40cc4e8bb9b31c.tar.xz mediagoblin-6e38fec80ebaadc3b3cfdc912f40cc4e8bb9b31c.zip |
Fix Issue 5375 Deprecated function in video thumb
This patch fixes issue 5375 by replacing a function call that has
been removed in recent versions of PIL with the recommended
replacement.
(cherry picked from commit 564a48e018bcd786aa32b232cb7216be3ef3fb5e)
-rw-r--r-- | mediagoblin/media_types/video/transcoders.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/media_types/video/transcoders.py b/mediagoblin/media_types/video/transcoders.py index 57912c54..f8020497 100644 --- a/mediagoblin/media_types/video/transcoders.py +++ b/mediagoblin/media_types/video/transcoders.py @@ -132,7 +132,7 @@ def capture_thumb(video_path, dest_path, width=None, height=None, percent=0.5): buffer = sample.get_buffer() # get the image from the buffer and save it to disk - im = Image.fromstring('RGB', (width, height), + im = Image.frombytes('RGB', (width, height), buffer.extract_dup(0, buffer.get_size())) im.save(dest_path) _log.info('thumbnail saved to {0}'.format(dest_path)) |