Headless Screenshot, or resolution enforcement
It would be nice to be able to render a drawing at a specific resolution, and then save that to a file on disk. However, I've encountered two problems.
The first is finding a clean way of calling save_screenshot() when I just want to render and save in one shot. There are options within set_run_mode, which I believe is a corollary to set_loop_mode suggested in #758, but view seems to be called before the window is provisioned such that save_screenshot() (which I am calling in view) fails the first time it's called, and save_screenshot() is non blocking so that trying to exit after calling it leads to it failing, as such:
2026-07-18T23:22:28.244024Z INFO bevy_winit::system: Creating new window seasonal-tree (174v0)
2026-07-18T23:22:28.347941Z WARN bevy_render::view::window::screenshot: Unknown window for screenshot, skipping: 174v0
2026-07-18T23:22:29.535037Z ERROR bevy_render::view::window::screenshot: Failed to send screenshot: sending on a closed channelThe second problem, is that I would like to enforce the resolution from which I'm taking the screenshot, but the API has changed since previous attempts such as #947 that I'm at a loss for how it would be done now. I've put headless in the title, but I would be happy with something similar to draw_capture_high_res.rs where a window still gets called.
Source: nannou-org/nannou