1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 02:48:23 +08:00

Opt: [ALAS] Reuse image array to improve memory performance

This commit is contained in:
LmeSzinc
2024-03-21 21:28:37 +08:00
parent 6a23f82e6c
commit 06cd62f3ee
4 changed files with 23 additions and 12 deletions

View File

@@ -122,7 +122,7 @@ class Uiautomator2(Connection):
if image is None:
raise ImageTruncated('Empty image after cv2.imdecode')
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
cv2.cvtColor(image, cv2.COLOR_BGR2RGB, dst=image)
if image is None:
raise ImageTruncated('Empty image after cv2.cvtColor')