From 150639ced3816e851cc68f3bc9d5b68076575d93 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 16 Jun 2016 13:55:29 +0200 Subject: [PATCH] only use frombytes, exists for a long time --- oxtimelines/ffmpeg.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/oxtimelines/ffmpeg.py b/oxtimelines/ffmpeg.py index 85bf08e..c941b94 100644 --- a/oxtimelines/ffmpeg.py +++ b/oxtimelines/ffmpeg.py @@ -118,15 +118,12 @@ def video(path, height=96, info=None, framerate=FPS): data = p.stdout.read(nbytes) if len(data) != nbytes: if first: - raise IOError("ERROR: could not open file %s" % path ) + raise IOError("ERROR: could not open file %s" % path) else: return else: first = False - if hasattr(Image, 'fromstring'): - yield Image.fromstring('RGB', (width, height), data) - else: - yield Image.frombytes('RGB', (width, height), data) + yield Image.frombytes('RGB', (width, height), data) def audio(path, info=None, samplerate=48000, framerate=FPS): depth = 2