tools: take_screenshot: read screen resolution from device if not provided