Struct png::Reader
[−]
[src]
pub struct Reader<R: Read> { /* fields omitted */ }
PNG reader (mostly high-level interface)
Provides a high level that iterates over lines or whole images.
Methods
impl<R: Read> Reader<R>
[src]
fn info(&self) -> &Info
fn next_frame(&mut self, buf: &mut [u8]) -> Result<(), DecodingError>
Decodes the next frame into buf
fn next_row(&mut self) -> Result<Option<&[u8]>, DecodingError>
Returns the next processed row of the image
fn next_interlaced_row(
&mut self
) -> Result<Option<(&[u8], Option<(u8, u32, u32)>)>, DecodingError>
&mut self
) -> Result<Option<(&[u8], Option<(u8, u32, u32)>)>, DecodingError>
Returns the next processed row of the image
fn output_color_type(&mut self) -> (ColorType, BitDepth)
Returns the color type and the number of bits per sample
of the data returned by Reader::next_row
and Reader::frames`.
fn output_buffer_size(&self) -> usize
Returns the number of bytes required to hold a deinterlaced image frame that is decoded using the given input transformations.
fn output_line_size(&self, width: u32) -> usize
Returns the number of bytes required to hold a deinterlaced row.