Open rainwater11 opened 4 years ago
If you take a look at how locate works, it has a check for if filename, otherwise it assumes a PIL.Image.
So you can do PIL.Image.open(StringIO(base64.b64decode(b64_string))) to generate an image object from base64 and that should work if you pass it in. I haven't tested with pyautogui myself, but this should work as I've implemented something similar in my program.
https://github.com/asweigart/pyscreeze/blob/master/pyscreeze/__init__.py
Is there a way to find an image based on base64 string instead of reading the file from disk?