Function img2text::set_spans_by_fn

source ·
pub fn set_spans_by_fn(
    out_spans: &mut [Span],
    num_pixels: usize,
    f: impl FnMut(usize) -> bool
)
Expand description

Fill [Span] using a given function that returns the desired value for each bit.