fix: comment logging
This commit is contained in:
parent
9cc60bdec3
commit
95cc09106e
|
@ -10,16 +10,16 @@ DATA_FOLDER = "data/"
|
||||||
|
|
||||||
def take_screenshot(device):
|
def take_screenshot(device):
|
||||||
result = device.screencap()
|
result = device.screencap()
|
||||||
logging.debug("screenshot taken")
|
# logging.debug("screenshot taken")
|
||||||
image = Image.open(io.BytesIO(result))
|
image = Image.open(io.BytesIO(result))
|
||||||
image = image.crop((0, 160, 2200, 860))
|
image = image.crop((0, 160, 2200, 860))
|
||||||
image.thumbnail((150, 150))
|
image.thumbnail((150, 150))
|
||||||
logging.debug("screenshot converted")
|
# logging.debug("screenshot converted")
|
||||||
# image = image.resize((150, 150), Image.ANTIALIAS)
|
# image = image.resize((150, 150), Image.ANTIALIAS)
|
||||||
|
|
||||||
filename = uuid.uuid1()
|
filename = uuid.uuid1()
|
||||||
image.save(f"{DATA_FOLDER}/{filename}.png")
|
image.save(f"{DATA_FOLDER}/{filename}.png")
|
||||||
logging.debug("screenshot saved")
|
# logging.debug("screenshot saved")
|
||||||
|
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue