Trait img2text::ImageRead[][src]

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

Required methods

fn dims(&self) -> [usize; 2][src]

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

fn copy_line_as_spans_to(&self, y: usize, out: &mut [Span])[src]

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.

Loading content...

Implementors

Loading content...