Files
kebab/crates/kebab-parse-image/examples/gen_smoke_png.rs
altair823 685007789a style: cargo fmt --all (round 4 ingest log feature follow-up)
Phase C4 executor 의 마지막 `fix(test): clippy + fmt fixes` commit 이
test file 부분만 fmt 적용. workspace 전체 fmt 누락 발견 → cargo fmt --all
적용. 모든 import alphabetical reorder + line wrapping 정합.

추가 untracked artifact 동시 commit:
- docs/superpowers/specs/2026-05-28-v0.20-ingest-log-spec.md (491 line, ACCEPT)
- docs/superpowers/plans/2026-05-28-v0.20-ingest-log-plan.md (616 line, ACCEPT)

workspace test: 1370 passed / 0 failed / 50 ignored, ingest_log_smoke green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 04:18:40 +00:00

21 lines
723 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! `cargo run --example gen_smoke_png -p kebab-parse-image -- <out.png>`
//!
//! 100×50 solid-red PNG used by the SMOKE runbook for the image
//! filename-indexing path (OCR / caption disabled).
use image::{ImageBuffer, Rgb};
use std::io::Cursor;
fn main() {
let out = std::env::args()
.nth(1)
.expect("usage: gen_smoke_png <out.png>");
let img: ImageBuffer<Rgb<u8>, _> = ImageBuffer::from_fn(100, 50, |_, _| Rgb([255, 0, 0]));
let mut buf = Cursor::new(Vec::new());
img.write_to(&mut buf, image::ImageFormat::Png)
.expect("encode PNG");
let bytes = buf.into_inner();
std::fs::write(&out, &bytes).expect("write");
println!("wrote {} ({} bytes)", out, bytes.len());
}