|
Post by AnkuLua on Jan 9, 2020 22:20:40 GMT
Current implementation creates only one tmp.png and saves it to sdcard root (emulated scard) It's better to make one more checkbox - create unique file and add timestamp to filename. something like this: if (DEBUG): print "start taking screenshot"
device = devices[cmbDevice.selectedIndex]
t = int(round(time.time() * 1000))
f = "tmp%s.png" % t
print(f)
print("****************")
command = "tools\\adb -s " + device + " shell screencap -p /sdcard/AnkuLua/captured_images/" + f
os.system(command)
command = "tools\\adb -s " + device + " pull /sdcard/AnkuLua/captured_images/" + f + " " + f + " 2> nul"
os.system(command) mat = Highgui.imread( f, Highgui.IMREAD_COLOR)
...
os.system("del " + f)
Thanks for the suggestion.
|
|