讨厌的Python图像.像素方法ISU

2024-06-28 19:31:40 发布

您现在位置:Python中文网/ 问答频道 /正文

所以我只是想学习如何使用图像模块,但由于某些原因PyCharm无法识别图像.像素方法,即使我已经导入了图像模块。我想这是个简单的问题,但我做错什么了?(我安装了PIL)

from PIL import Image

p = Image.Pixel(45, 76, 200)

print(p.getRed())

PyCharm告诉我“importorror:没有名为”Pixel“的模块,但是从我在这里读到的(http://interactivepython.org/courselib/static/thinkcspy/MoreAboutIteration/2DimensionalIterationImageProcessing.html#image-objects),我真的不明白为什么这不起作用。。。你知道吗

提前谢谢各位。你知道吗


Tags: 模块方法from图像imageimporthttppil