From 564a48e018bcd786aa32b232cb7216be3ef3fb5e Mon Sep 17 00:00:00 2001 From: ayleph Date: Thu, 17 Dec 2015 21:06:42 -0500 Subject: [PATCH] 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. --- mediagoblin/media_types/video/transcoders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.25.1