Skip to content

Commit

Permalink
hotfix for screenshot().save(s.jpg) error
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed May 25, 2021
1 parent 9585e2e commit 26f21e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wda/__init__.py
Expand Up @@ -562,7 +562,8 @@ def screenshot(self, png_filename=None, format='pillow'):
elif format == 'pillow':
from PIL import Image
buff = io.BytesIO(raw_value)
return Image.open(buff)
im = Image.open(buff)
return im.convert("RGB") # convert to RGB to fix save jpeg error
else:
raise ValueError("unknown format")

Expand Down

0 comments on commit 26f21e1

Please sign in to comment.