-
Notifications
You must be signed in to change notification settings - Fork 9
using width and/or height parameters in .screenshot causes an infinite loop #9
Copy link
Copy link
Open
Description
I am trying to do a screenshot of a docker container which runs firefox and a vnc, you can run this yourself like:
docker run -p 5900:5900 jlesage/firefox
I then want to take a screenshot and reduce the image size so it hopefully runs faster:
import asyncio, asyncvnc
from PIL import Image
async def get_screenshot():
host = "localhost"
port = 5900
async with asyncvnc.connect(host, port) as client:
pixels = await client.screenshot(width=320, height=240)
image = Image.fromarray(pixels)
image.save("screenshot.png")
if __name__ == "__main__":
asyncio.run(get_screenshot())The code seems to get stuck on an infinite loop somewhere (hard for me to find out where).
On a separate note, what I really want to do is lower the resolution but keep the whole screen size, do you know if this is possible?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels