SuperMonster003 / AutoJs6

安卓平台 JavaScript 自动化工具 (Auto.js 二次开发项目)
https://docs.autojs6.com
Mozilla Public License 2.0
2.16k stars 656 forks source link

在截图及OCR时偶尔会出现下面的报错 #172

Open nsy9601 opened 7 months ago

nsy9601 commented 7 months ago

java.lang.IllegalArgumentException: y + height must be <= bitmap.height() 脚本代码如下: let src = images.captureScreen(); let left = 300, top = 1200, right = 700, bottom = 1600, width = right - left, height = bottom - top; let img = images.clip(src, left, top, width, height); let results = ocr.detect(img);

sindon123 commented 7 months ago

偶尔是会遇到,用try catch跳过错误

sy-1996 commented 7 months ago

我的也有这种情况,我保存查看横向截屏时,截的图像是竖屏,上下都是空白,类似于横屏短视频用竖屏观看那种情况,导致之前的clip坐标定位不准,无法进行后续操作。之前运行的好好的,突然就这样了,换设备也不行。

SuperMonster003 commented 7 months ago

感谢反馈, 将于后续版本尝试修复上述问题.

Sent from my XQ-DQ72 using FastHub