Create a temporary PNG screenshot and return its path.
(width=200, height=150)
| 47 | |
| 48 | |
| 49 | def _make_screenshot(width=200, height=150) -> str: |
| 50 | """Create a temporary PNG screenshot and return its path.""" |
| 51 | img = Image.new("RGB", (width, height), color=(255, 255, 255)) |
| 52 | tmp = tempfile.NamedTemporaryFile(suffix=".png", delete=False) |
| 53 | img.save(tmp.name) |
| 54 | return tmp.name |
| 55 | |
| 56 | |
| 57 | def _elem( |
no outgoing calls
no test coverage detected