sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #28899
[Question #256069]: Change the DPI of the screenshots taken?
New question #256069 on Sikuli:
https://answers.launchpad.net/sikuli/+question/256069
How do I change the DPI of the screenshots taken? I would like to get 600dpi+ and in some cases even 1200dpi screenshots
Here is the code I use to capture each screen separately every 2 seconds
import os
import shutil
import datetime
screenshotsDir = r"C:\Users\Sikuli\Temp\Exceptions"
screens = [Screen(id) for id in range(Screen().getNumberScreens())]
print screens # Prints [S(0)[0,0 1920x1080] E:Y, T:3.0, S(0)[0,0 1920x1080] E:Y, T:3.0] !
print Screen().getNumberScreens() # Prints 2
while True:
for _dx, screen in enumerate(screens):
print screen.getBounds()
img = screen.capture(screen.getBounds())
time_now = datetime.datetime.now().strftime("%H%M%S")
img_target = "{}.S{}.png".format(time_now, _dx)
target = os.path.join(screenshotsDir, img_target)
shutil.move(img, target)
time.sleep(2)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.