“Python tira uma captura de tela” Respostas de código

Python tira uma captura de tela

import pyautogui

myScreenshot = pyautogui.screenshot()
myScreenshot.save(r'Path to save screenshot\file name.png')
Purple Team

Como tirar uma captura de tela usando Python

import pyautogui
screenshot = pyautogui.screenshot()
screenshot.save("FilePathwhereyouwantToSave\\FileName.FileFormat")
Excited Emu

Faça a captura de tela de parte específica da tela python

import mss
import mss.tools


with mss.mss() as sct:
    # The screen part to capture
    monitor = {"top": 160, "left": 160, "width": 160, "height": 135}
    output = "sct-{top}x{left}_{width}x{height}.png".format(**monitor)

    # Grab the data
    sct_img = sct.grab(monitor)

    # Save to the picture file
    mss.tools.to_png(sct_img.rgb, sct_img.size, output=output)
    print(output)
Mardax

Respostas semelhantes a “Python tira uma captura de tela”

Perguntas semelhantes a “Python tira uma captura de tela”

Mais respostas relacionadas para “Python tira uma captura de tela” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código