diff options
-rw-r--r-- | mpv.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) |