# Save the screenshot to a BytesIO buffer screenshot_buffer = BytesIO() screenshot.save(screenshot_buffer, format="PNG") screenshot_buffer.seek(0)
# Save the screenshot to a BytesIO buffer screenshot_buffer = BytesIO() screenshot.save(screenshot_buffer, format="PNG") screenshot_buffer.seek(0)