Struct image::tiff::TIFFDecoder [] [src]

pub struct TIFFDecoder<R> where R: Read + Seek {
    // some fields omitted
}

The representation of a TIFF decoder

Currently does not support decoding of interlaced images

Methods

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

fn new(r: R) -> ImageResult<TIFFDecoder<R>>

Create a new decoder that decodes from the stream r

fn init(self) -> ImageResult<TIFFDecoder<R>>

Initializes the decoder.

fn next_image(self) -> ImageResult<TIFFDecoder<R>>

Reads in the next image. If there is no further image in the TIFF file a format error is return. To determine whether there are more images call TIFFDecoder::more_images instead.

fn more_images(&self) -> bool

Returns true if there is at least one more image available.

fn byte_order(&self) -> ByteOrder

Returns the byte_order

fn read_short(&mut self) -> Result<u16Error>

Reads a TIFF short value

fn read_long(&mut self) -> Result<u32Error>

Reads a TIFF long value

fn read_offset(&mut self) -> Result<[u8; 4]Error>

Reads a TIFF IFA offset/value field

fn goto_offset(&mut self, offset: u32) -> Result<()>

Moves the cursor to the specified offset

Trait Implementations

impl<R: Debug> Debug for TIFFDecoder<R> where R: Read + Seek
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<R: Read + Seek> ImageDecoder for TIFFDecoder<R>
[src]

fn dimensions(&mut self) -> ImageResult<(u32, u32)>

Returns a tuple containing the width and height of the image

fn colortype(&mut self) -> ImageResult<ColorType>

Returns the color type of the image e.g. RGB(8) (8bit RGB)

fn row_len(&mut self) -> ImageResult<usize>

Returns the length in bytes of one decoded row of the image

fn read_scanline(&mut self, _: &mut [u8]) -> ImageResult<u32>

Reads one row from the image into buf and returns the row index

fn read_image(&mut self) -> ImageResult<DecodingResult>

Decodes the entire image and return it as a Vector

fn is_animated(&mut self) -> ImageResult<bool>

Returns true if the image is animated

fn into_frames(self) -> ImageResult<Frames>

Returns the frames of the image Read more

fn load_rect(&mut self, x: u32, y: u32, length: u32, width: u32) -> ImageResult<Vec<u8>>

Decodes a specific region of the image, represented by the rectangle starting from x and y and having length and width Read more