diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2015-05-22 14:16:45 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2015-05-22 14:16:45 -0500 |
commit | 5b8e0b2a63194d53da2ce434e867fc5eab1b60b4 (patch) | |
tree | 72b3bae6dcead41b59d73d0d9617974e3a2375b9 | |
parent | c2382bd4ea50891a483eaef75a7f69f7fe3ad332 (diff) | |
download | mediagoblin-5b8e0b2a63194d53da2ce434e867fc5eab1b60b4.tar.lz mediagoblin-5b8e0b2a63194d53da2ce434e867fc5eab1b60b4.tar.xz mediagoblin-5b8e0b2a63194d53da2ce434e867fc5eab1b60b4.zip |
Use of deprecated frombytes when processing videos causes the task to fail
(Anonymous contribution, not by me)
When transcoding a video using a recent version of PIL transcoding a
video fails reproducible. The reason for this is an AttributeError:
'module' object has no attribute 'frombytes'gets raised, while a
thumbnails is being created. This is because frombytes alias was
deprecated in favor of fromstring.
-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 ba469af2..6e0b702b 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.frombytes('RGB', (width, height), + im = Image.fromstring('RGB', (width, height), buffer.extract_dup(0, buffer.get_size())) im.save(dest_path) _log.info('thumbnail saved to {0}'.format(dest_path)) |