//! 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(()) }