1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-17 05:15:25 +08:00

Opt: Remove redundant converts from pillow to numpy

This commit is contained in:
LmeSzinc
2022-01-24 23:43:53 +08:00
parent c5ed59ab26
commit e92579b5f9
28 changed files with 62 additions and 64 deletions

View File

@@ -47,7 +47,7 @@ class AmbushHandler(Combat):
self.wait_until_appear_then_click(MAP_AMBUSH_EVADE)
self.wait_until_appear(INFO_BAR_1)
image = info_letter_preprocess(np.array(self.image_crop(INFO_BAR_DETECT)))
image = info_letter_preprocess(self.image_crop(INFO_BAR_DETECT))
if TEMPLATE_AMBUSH_EVADE_SUCCESS.match(image):
logger.attr('Ambush_evade', 'success')
@@ -110,7 +110,7 @@ class AmbushHandler(Combat):
if not self.appear(INFO_BAR_1):
return False
image = info_letter_preprocess(np.array(self.image_crop(INFO_BAR_DETECT)))
image = info_letter_preprocess(self.image_crop(INFO_BAR_DETECT))
if TEMPLATE_MAP_WALK_OUT_OF_STEP.match(image):
logger.warning('Map walk out of step.')
self.handle_info_bar()