Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance compare_rect(..) #11

Open
paulie-g opened this issue Sep 15, 2017 · 0 comments
Open

enhance compare_rect(..) #11

paulie-g opened this issue Sep 15, 2017 · 0 comments
Labels

Comments

@paulie-g
Copy link
Owner

Issue by lecheel
Monday Feb 13, 2012 at 02:32 GMT
Originally opened as autopilot-rs#31


from PIL import Image
possible add following api for rect compare using native autopy instead PIL

def compare_rect((ax,ay),bmp_name):
im=Image.open(bmp_name)
rect = ((ax-1,ay-1),(im.size[0]+2,im.size[1]+2))
tst = bitmap.Bitmap.open(bmp_name)
scr = bitmap.capture_screen(rect)
pos = scr.find_bitmap(tst)
if pos:
return 1
else:
return 0

@paulie-g paulie-g added the bug label Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant