然后打开一个图像,将一个像素的颜色更改为红色,然后将图像嵌入到canvas小部件中。然而,它似乎不起作用。File "C:\Python26\lib\site-packages\PIL\ImageTk.py", line 109, in __init__ File "C:\Python26\lib\site-packages\PIL\Image.py", line 245,
checking=MonkeyRunner.loadImageFromFile(chk)checking=MonkeyRunner.loadFromFile(chk)checking=MonkeyImage.loadFromFile(chk)回溯(最近一次调用):文件"stdin",第1行,在AttributeError: type object 'com.android.monkeyrunner.MonkeyRunner‘中没有attri 'loadFromFile'
我有一个要转换为Python数组的.jpg图像,因为我实现了处理普通Python数组的处理例程。似乎PIL图像支持到numpy数组的转换,根据我写的文档:im = Image.open("D:\Prototype\Bikesgray.jpg")这将返回一个numpy数组列表。此外,我还尝试了
list([list(x) for