Closed LeonYin945 closed 5 years ago
numpy切片传入的必须是整型,而v*pattern_scale
会生成 浮点型,导致imutils.crop中的 image[top:bottom, left:right] 切片失败,
home_rect = (int(screenw * 0.875), int(screenh * 0.5), screenw, screenh) d.click_image("home@auto.png", rect=home_rect)
说明:
numpy切片传入的必须是整型,而v*pattern_scale
会生成 浮点型,导致imutils.crop中的 image[top:bottom, left:right] 切片失败,
场景:
home_rect = (int(screenw * 0.875), int(screenh * 0.5), screenw, screenh) d.click_image("home@auto.png", rect=home_rect)