Comments (15)
那我这边应该也处理下不同DPI
win32 应该有返回DPI缩放比率的
from auto-derby.
第二张也不对 正确的是无外边框纯内容 466x828 大小的
日志发一下
我没用 python 3.9 测试过 不知道是不是这个问题
from auto-derby.
第二张也不对 正确的是无外边框纯内容 466x828 大小的
日志发一下
我没用 python 3.9 测试过 不知道是不是这个问题
INFO [2021-06-01 10:31:25]:auto_derby.window:58: width=466 height=828
INFO [2021-06-01 10:31:25]:auto_derby.window:60: already in wanted size
INFO [2021-06-01 10:31:25]:main:52: game window: 788770
INFO [2021-06-01 10:31:28]:auto_derby.template:186: no match: tmpl=('connecting.png', 'retry_button.png', 'nurturing_command_training.png', 'nurturing_fans_not_enough.png', 'nurturing_finish_button.png', 'nurturing_formal_race_banner.png', 'nurturing_race_next_button.png', 'nurturing_option1.png', 'green_next_button.png', 'nurturing_ura_finals.png', 'nurturing_gene_inherit.png')
from auto-derby.
在这个页面这样显示是正常的 育成需要你手动选完卡进去之后才能自动
from auto-derby.
在这个页面这样显示是正常的 育成需要你手动选完卡进去之后才能自动
我也这样试过,但是问题是screenshot得到的图片是不正确的,识别不到按钮
from auto-derby.
是不是因为你游戏画面没全部显示在屏幕里 我看你任务栏挡住了
我双屏都没问题 这个直接调用的是windows自己的API 应该不大可能出错
from auto-derby.
第一张图的尺寸是对的 要不然就是 PIL.ImageGrab 的 bug
你在这里加个 print(locals())
比较下坐标数据是不是对的 错的话是怎么错的
auto-derby/auto_derby/template.py
Line 33 in d714c1e
from auto-derby.
https://stackoverflow.com/questions/25467288/pils-imagegrab-is-capturing-at-the-wrong-resolution
或者是因为你系统 DPI 设置?
Stack OverflowI'm trying to get a full screen (1920 x 1080) capture using this code. The saved images are only 1536 x 864 though.solution: As Mark pointed out below, Windows has scaling which can be changed via
from auto-derby.
https://stackoverflow.com/questions/25467288/pils-imagegrab-is-capturing-at-the-wrong-resolution
或者是因为你系统 DPI 设置?Stack Overflow**PIL's ImageGrab is capturing at the wrong resolution**I'm trying to get a full screen (1920 x 1080) capture using this code.
The saved images are only 1536 x 864 though.
solution: As Mark pointed out below, Windows has scaling which can be changed via
解决了。。。,确实是分辨率问题,笔记本有125%缩放导致坐标获取有偏移,感谢
Stack OverflowI'm trying to get a full screen (1920 x 1080) capture using this code. The saved images are only 1536 x 864 though.solution: As Mark pointed out below, Windows has scaling which can be changed via
from auto-derby.
不对 这个在pillow PR4000 里修了啊
https://github.com python-pillow Pillow/pull/4000
你是不是用的版本太老
GitHub is where over 65 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
from auto-derby.
不对 这个在pillow PR4000 里修了啊
https://github.com python-pillow Pillow/pull/4000
你是不是用的版本太老GitHub**GitHub: Where the world builds software**GitHub is where over 65 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
不是Pillow的原因,应该就是win32API的问题
GitHub is where over 65 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and feat...
from auto-derby.
那我这边应该也处理下不同DPI
win32 应该有返回DPI缩放比率的
找到了一个解决方案
在__main__.py中添加
ctypes.windll.shcore.SetProcessDpiAwareness(2)
在缩放率125%的情况下是成功的,不知道其他缩放率下是否可以
from auto-derby.
PIL 用的是 SetThreadDpiAwarenessContext 不知道(Handle)-3是什么意思
其实这个应该算 PIL bug 因为它确实有尝试支持不同的 DPI
Fixes #2438 and its duplicates #3432, #3626 for Windows 10 version 1607+ (Anniversary Update). This PR uses SetThreadDpiAwarenessContext to temporarily make Python DPI aware. This function returns ...
from auto-derby.
StackOverflow 回答下面有个用 SetProcessDPIAware 的
from ctypes import windll
windll.user32.SetProcessDPIAware()
from auto-derby.
StackOverflow 回答下面有个用 SetProcessDPIAware 的
from ctypes import windll windll.user32.SetProcessDPIAware()
嗯,试过了,确实能行
from auto-derby.
Related Issues (20)
- not all arguments converted during string formatting HOT 1
- Random race track and distance races are not selected correctly HOT 1
- 不能选择不同赛道参赛人数不一致的比赛 HOT 4
- new race_menu.py has issues HOT 1
- OCR of 21 with ADB HOT 1
- 小栗帽巅峰杯出道战,软件报错退出 HOT 5
- OCR切字识别出现错误
- 青春杯无法进入队伍对战 HOT 2
- 偶像杯无法使用,感觉是无法睡觉与出行。 HOT 5
- ModuleNotFoundError: No module named 'cv2.img_hash'; 'cv2' is not a package HOT 1
- wrong race been selected when course data is same (オークス/日本ダービー)
- 识别属性上限
- 支持剧本 `つなげ、照らせ、ひかれ。 私たちのグランドライブ`
- 无法正常识别到比赛 HOT 5
- 训练报错
- cv2.error HOT 2
- 育成中止
- 简中适配替换templates图片素材 HOT 31
- 报错’type' object is not subscriptable HOT 1
- afk模式可不可以更新适配一下老剧本 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-derby.