Trait img2text::ImageRead

source ·
pub trait ImageRead {
    fn dims(&self) -> [usize; 2];
    fn copy_line_as_spans_to(&self, y: usize, out: &mut [Span]);
}

Required Methods§

Get the image’s dimensions as [width, height].

Convert the specified row to Spans.

out contains at least (self.dims()[0] + Span::BITS - 1) / Span::BITS elements.

set_spans_by_fn may be useful to implement this method.

Implementors§