Skip to main content

looks_unrendered

Function looks_unrendered 

Source
pub(crate) fn looks_unrendered(img: &RgbaImage) -> bool
Expand description

Cheap heuristic for “this capture is probably a blank/unpainted frame, not a real render” — sample ~200 evenly-spaced pixels and check they’re all within a small tolerance of the first one. Not real image analysis (a legitimately solid-color themed window would also trip this) — deliberately cheap and approximate, used only to decide whether a short bounded retry is worth attempting, and to set likely_unrendered as a hint, never as a hard failure.