fix(core): 修复 Device 中缩放与截图 Hook 的处理顺序不正确问题
This commit is contained in:
parent
9935087753
commit
e8851a683d
|
@ -339,9 +339,9 @@ class Device:
|
|||
logger.debug("screenshot hook before returned image")
|
||||
return img
|
||||
img = self.screenshot_raw()
|
||||
img = self.__scale_image(img)
|
||||
if self.screenshot_hook_after is not None:
|
||||
img = self.screenshot_hook_after(img)
|
||||
img = self.__scale_image(img)
|
||||
return img
|
||||
|
||||
def screenshot_raw(self) -> MatLike:
|
||||
|
|
|
@ -4,7 +4,7 @@ import runpy
|
|||
import logging
|
||||
import argparse
|
||||
|
||||
from kaa.common import BaseConfig
|
||||
from kotonebot.kaa.common import BaseConfig
|
||||
|
||||
|
||||
def run_script(script_path: str) -> None:
|
||||
|
@ -21,7 +21,7 @@ def run_script(script_path: str) -> None:
|
|||
print(f"正在运行脚本: {script_path}")
|
||||
# 运行脚本
|
||||
from kotonebot.backend.context import init_context, manual_context
|
||||
from kaa.main.kaa import Kaa
|
||||
from kotonebot.kaa.main.kaa import Kaa
|
||||
logging.getLogger('kotonebot').setLevel(logging.DEBUG)
|
||||
config_path = './config.json'
|
||||
kaa_instance = Kaa(config_path)
|
||||
|
|
Loading…
Reference in New Issue