1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-09 18:39:04 +08:00

Fix: ADB Image pre-process on MuMu (#920)

This commit is contained in:
LmeSzinc 2022-02-06 17:32:04 +08:00
parent aec03ec069
commit b3e1715d04

View File

@ -60,6 +60,8 @@ class Adb(Connection):
image = np.fromstring(screenshot, np.uint8)
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
if image is None:
raise OSError('Empty image')
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
return image