-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java调用任务时截图颜色异常 #509
Comments
是不是通道顺序错啦,maafw 给的是 bgr @hanhuoer |
我这边测试下来没有复现,可以详细说说你是怎么使用的吗?或者提供一个最小用例。 @SCzfdf 以下是我的测试关健代码: @Test
void postTaskCase() {
bind();
TaskFuture<TaskDetail> taskFuture = null;
// taskFuture = tasker.postPipeline("rec_google_click");
taskFuture = tasker.postPipeline("rec_sketchbook_click");
// taskFuture = tasker.postPipeline("rec_via_click");
taskFuture.waiting();
TaskDetail taskDetail = taskFuture.get();
log.info("task detail: {}", taskDetail);
} pipeline {
"rec_google_click": {
"recognition": "TemplateMatch",
"template": "google.png",
"action": "Click"
},
"rec_sketchbook_click": {
"recognition": "TemplateMatch",
"template": "sketchbook.png",
"action": "Click"
},
"rec_via_click": {
"recognition": "TemplateMatch",
"template": "via.png",
"action": "Click"
}
} |
我这边又试了一下 controller 的截图功能,把文件保存下来后颜色没有异常,所以很好奇你那边的使用方式是什么 @SCzfdf @Test
void screenshotTestCase() throws IOException {
bind();
BufferedImage screencap = tasker.controller().screencap();
// save
File file = FileUtils.join("screenshot", "ss_" + System.currentTimeMillis() + ".png");
ImageIO.write(screencap, "png", file);
// base64 image
String base64 = ImageUtils.toBase64(screencap);
System.out.println(base64);
} |
你的项目是咋用的,跑起来后哪里能调试到颜色不对的地方,我这边跑了几次没看到图片 @SCzfdf 感觉不像是通道的问题,这边尝试调整通道后反而颜色不对了。 |
直接启动MaaRandomDiceApplication 。需要把debug的截图打开 |
ok截图顺序没问题了 https://github.com/SCzfdf/maa-random-dice项目也更新了 这是日志 |
就是字面意思,你的资源里没有 recognition_single_blue_ston_2,仅依靠 pipeline_override。尝试去覆盖资源,但资源里没找到 所以也是 warning 而不是 error |
需要 warning 不用管 |
python调用是正常的
java调用
python调用
The text was updated successfully, but these errors were encountered: