(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.
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))