mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 00:28:20 +08:00
Opt: Lazy load ambush and enhancement templates
- Opt: move letter preprocess functions to info_bar.py
This commit is contained in:
@@ -4,6 +4,22 @@ from module.handler.assets import *
|
||||
from module.logger import logger
|
||||
|
||||
|
||||
def info_letter_preprocess(image):
|
||||
"""
|
||||
Args:
|
||||
image (np.ndarray):
|
||||
|
||||
Returns:
|
||||
np.ndarray
|
||||
"""
|
||||
image = image.astype(float)
|
||||
image = (image - 64) / 0.75
|
||||
image[image > 255] = 255
|
||||
image[image < 0] = 0
|
||||
image = image.astype('uint8')
|
||||
return image
|
||||
|
||||
|
||||
class InfoHandler(ModuleBase):
|
||||
"""
|
||||
Class to handle all kinds of message.
|
||||
|
||||
Reference in New Issue
Block a user