Recently I started working with PIL together with AutoPy to automate some tasks. One of the core functions AutoPy is needed for is its suprisingly fast (though buggy, but there are fixes for that - the build and installation from source can be annoying, and if you get the error Unable to find vcvarsall.bat
, just google it).
But just now I ran into a problem I can't find a fix for. PIL and AutoPy use fundamentally diffrent formats for their screenshots. For AutoPy I couldnt get it to work with multiple screens, but for PIL i easily could. Now I need to convert these Images into a format AutoPy accepts - and that in a reasonable amount of time.
A theoratically possible solution:
def test():
Img = Image.open("example.png")
Img.save("test.png")
Img2.open("test.png")
Going by my testing, this takes roughly around 0.5 seconds to complete. Far more than the 0.1 seconds I'd need.