summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mpv.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpv.py b/mpv.py
index c64f735..413182e 100644
--- a/mpv.py
+++ b/mpv.py
@@ -683,7 +683,7 @@ class MPV(object):
if res['format'] != 'bgr0':
raise ValueError('Screenshot in unknown format "{}". Currently, only bgr0 is supported.'
.format(res['format']))
- img = Image.frombytes('RGBA', (res['w'], res['h']), res['data'])
+ img = Image.frombytes('RGBA', (res['stride']//4, res['h']), res['data'])
b,g,r,a = img.split()
return Image.merge('RGB', (r,g,b))