📜  python 使用 PIL 保存屏幕截图 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:07.635000             🧑  作者: Mango

代码示例1
#python 3
from PIL import ImageGrab 
snapshot = ImageGrab.grab()
save_path = "C:\\Users\\YourUser\\Desktop\\MySnapshot.jpg" #dont forget to write the name and the extension of the file in the end
snapshot.save(save_path)