-
-
Notifications
You must be signed in to change notification settings - Fork 111
Example PIL #22
Copy link
Copy link
Closed
Labels
Description
https://python-mss.readthedocs.io/en/dev/examples.html#pil
Os Windows
# Create the Image, solution 1 (slower)
# img = Image.frombytes('RGB', sct_img.size, sct_img.content)
sct_img.content - no attribute into sct_img
# Create the Image, solution 2
img = Image.frombytes('RGBA', sct_img.size, bytes(sct_img.raw), 'raw', 'BGRA')
img = img.convert('RGB') # Convert to RGB
Equivalent, which is faster
img = Image.frombytes('RGB', sct_img.size, sct_img.rgb, 'raw')
Reactions are currently unavailable