[英]Take screenshot of python tkinter window (NOT entire computer screen)
[英]Take “screenshot” of application window/label in tkinter
I am working on some sort of animation maker with tkinter but I have run into a problem, i would want to save the current application window or canvas widget to a.png file for later use, is this possible? 提前致谢。
import pyautogui
myScreenshot = pyautogui.screenshot()
myScreenshot.save(r'Path to save screenshot\filename.png')
它就在那里! ^^
如果您不希望屏幕上显示其他所有内容,可以尝试使用 pil 裁剪它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.