Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image, ImageGrab
- from win32api import GetSystemMetrics
- w = GetSystemMetrics(0)
- h = GetSystemMetrics(1)
- image = Image.new('RGB', (w, h))
- screen = ImageGrab.grab().load()
- for w in range(w):
- for h in range(h):
- image.putpixel((w, h), screen[w, h])
- image.save('1.png', 'png')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement