1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-19 10:43:33 +08:00

Pref: Reuse image array to improve memory performance

This commit is contained in:
LmeSzinc
2024-06-05 00:20:31 +08:00
parent 77d48937fc
commit 58202c6a40
34 changed files with 61 additions and 58 deletions

View File

@@ -41,7 +41,7 @@ def get_research_series_3(image, series_button=RESEARCH_SERIES):
list[int]:
"""
return [
match_series(crop(image, area_pad(button.area, pad=-10)), scaling)
match_series(crop(image, area_pad(button.area, pad=-10), copy=False), scaling)
for scaling, button in zip(RESEARCH_SCALING, series_button)
]
@@ -54,4 +54,4 @@ def get_detail_series(image):
Returns:
int:
"""
return match_series(crop(image, area_pad(SERIES_DETAIL.area, pad=-30)), scaling=1.0)
return match_series(crop(image, area_pad(SERIES_DETAIL.area, pad=-30), copy=False), scaling=1.0)