在编个自动化的小程序,需要判断屏幕某点颜色,发现pyautogui.pixel() 及 pyautogui.pixelMatchesColor()不能正常工作,
总是出错。实在不明白。这是为什么?怎么解决?
2条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
CSDN专家-HGJ 2021-10-26 19:38最佳回答 专家已采纳这是一个软件版本运行中bug,解决办法,升级 PyScreeze到 0.1.28使用命令: pip install -U pyscreeze.
参考:windows - Pyautogui and pyscreeze crash with windll.user32.ReleaseDC failed - Stack Overflow I'm trying to compare certain pixel values in my pyautogui script, but it crashes with following error message after either multiple successful runs, or sometimes just straight on the first call: https://stackoverflow.com/questions/59146513/pyautogui-and-pyscreeze-crash-with-windll-user32-releasedc-failed如对你有帮助,请点击采纳按钮~~
采纳该答案 已采纳该答案 专家已采纳评论解决 1 无用打赏举报微信扫一扫
分享评论登录 后可回复...
查看更多回答(1条)
报告相同问题?
提交
相关推荐 更多相似问题
- 2021-10-26 19:04回答 2 已采纳 这是一个软件版本运行中bug,解决办法,升级 PyScreeze到 0.1.28使用命令: pip install -U pyscreeze.参考: windows -
- 2021-08-11 13:10回答 2 已采纳 可以尝试写成 cv2.VideoCapture(0+cv2.CAP_DSHOW)试试,另外camera.read(),应该写成 ret,frame=camera.read()。如果仍然报错,就是cv2
- 2019-06-12 09:08回答 1 已采纳 I just found out that there is nothing like np.where() in gocv. All I have to do is: 1. get []byt
- 2021-09-25 14:42回答 1 已采纳 所获取的pixel是0-255之间的像数值,除以256就是将pixel转换成【0,1)之间的数,然后乘以字符串长度,分别作为字符串索引,去获取单个字符。如有帮助,请采纳。点击我回答右上角【采纳】按钮。
- 2018-12-09 16:14回答 1 已采纳 https://www.cnblogs.com/caiyishuai/category/1151952.html
- 2017-10-02 19:30回答 2 已采纳 I'm not sure if I understand your question entirely, but I do not think the purpose of ColorModel(
- 2016-03-04 14:27回答 1 已采纳 Try this. C# namespace ConsoleApplication1 { class Program { static void Main(st
- 2021-12-01 10:52回答 1 已采纳 没法拖就不知道怎么用了吗。。。。。。? using System; using System.Windows.Forms; using System.Drawing; using System
- 2021-06-21 15:20回答 1 已采纳 设个固定宽高,宽度100%,高度你按F12看一下现在是多少,直接设置成一样的值就行了
- 2022-01-04 15:36回答 1 已采纳 所获取到的内容是终端下的,不是图形显示界面下的内容,我也再找相关资料
- 没有解决我的问题, 去提问