mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-25 12:28:14 +08:00
Fix: ADB Image pre-process on MuMu (#920)
This commit is contained in:
@@ -60,6 +60,8 @@ class Adb(Connection):
|
|||||||
|
|
||||||
image = np.fromstring(screenshot, np.uint8)
|
image = np.fromstring(screenshot, np.uint8)
|
||||||
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
|
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
|
||||||
|
if image is None:
|
||||||
|
raise OSError('Empty image')
|
||||||
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user