我一直在使用python代码在rpi上使用Pillow模块。 我要显示图像,请稍等片刻,然后关闭图像。我使用的代码会打开一个窗口,上面显示图像,这是我需要在打开第二秒后关闭的窗口...
在提供代码之前,我已在rpi上使用终端安装了以下文件,仅供记录
sudo pip3 install Pillow
我的代码是:
from PIL import Image
import time
Img=Image.open("A.PNG") #A.PNG is the Image name
Img.show #Showing Image
time.sleep(1) #Wait for 1 second
##Here I need to close the window which has
图片已打开
如何使用此代码或可能使用任何其他选项。希望您能得到我想要的代码,通过解决上述问题或通过其他方法,可以解决问题的任何事物都会受到赞赏。