mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 07:28:21 +08:00
Refactor: Split out ConnectionAttr and refactor minitouch command builder
- Upgrade uiautomator2 to 2.16.17 to fix bugs - Use numpy.frombuffer() since numpy.fromstring() is deprecated
This commit is contained in:
@@ -84,7 +84,7 @@ class Adb(Connection):
|
||||
if screenshot.startswith(b'long long=8 fun*=10\n'):
|
||||
screenshot = screenshot.replace(b'long long=8 fun*=10\n', b'', 1)
|
||||
|
||||
image = np.fromstring(screenshot, np.uint8)
|
||||
image = np.frombuffer(screenshot, np.uint8)
|
||||
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
|
||||
if image is None:
|
||||
raise OSError('Empty image')
|
||||
|
||||
Reference in New Issue
Block a user