[英]ImageGrab.grab(bbox()) doesn't return RGB values
This is my code:这是我的代码:
import pyscreenshot as ImageGrab
class Main:
px = ImageGrab.grab(bbox=[799, 449, 800, 450]).load()
However, when I print px[0, 0] it returns me just an int, not an RGB triplet.但是,当我打印 px[0, 0] 时,它只返回一个 int,而不是一个 RGB 三元组。 Anyone knows why that is?
有谁知道这是为什么?
executing the following works for me为我执行以下工作
import pyscreenshot as ImageGrab
def main():
px = ImageGrab.grab(bbox=[799, 449, 800, 450]).load()
print(px[0, 0]);
main()
in the terminal在终端
$ python3 test.py
(27, 29, 30)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.