Struct farbfeld::Decoder [] [src]

pub struct Decoder<R> { /* fields omitted */ }

A farbfeld decoder

Methods

impl<R: Read + Seek> Decoder<R>
[src]

Create a new decoder from r and parse the header.

Failures

Returns Error::FormatError if the magic number does not match farbfeld

Returns the (width, height) of the image.

Returns the length in bytes for a row.

Read a single row from the image and return the bytes read.

Failures

Returns a Error::ImageEnd if the row is greater as the height

Read whole image into a Vec<u8>.

Trait Implementations

impl<R: Debug> Debug for Decoder<R>
[src]

Formats the value using the given formatter.