VNOX-Server/hub/examples/monster_preview.rs
loki5512344 c18ccadf99
chore(server): checkpoint deployed services and unfinished forums
User requested a checkpoint and stopped all agents. Deployed artifacts remain the last verified releases; unfinished settings/categories/forums are preserved as WIP. See TODO/roadmap for verification and remaining release/updater work.
2026-11-01 15:31:20 +01:00

22 lines
909 B
Rust

//! Writes a deterministic contact sheet without opening a desktop window or account.
fn main() -> anyhow::Result<()> {
let output = std::env::args()
.nth(1)
.unwrap_or_else(|| "/tmp/vnox-monsters.png".into());
let mut sheet = image::RgbImage::from_pixel(832, 624, image::Rgb([17, 19, 24]));
for index in 0..12 {
let id = format!("00000000-0000-4000-8000-{:012x}", index + 1);
let png =
vnox_hub::avatar::default_v2_png(&id).map_err(|_| anyhow::anyhow!("render failed"))?;
let image = image::load_from_memory(&png)?.to_rgb8();
let image = image::imageops::resize(&image, 192, 192, image::imageops::FilterType::Nearest);
image::imageops::replace(
&mut sheet,
&image,
(index % 4 * 208 + 8).into(),
(index / 4 * 208 + 8).into(),
);
}
sheet.save(output)?;
Ok(())
}