Struct tiff::decoder::Decoder

source ·
pub struct Decoder<R>where
    R: Read + Seek,
{ /* private fields */ }
Expand description

The representation of a TIFF decoder

Currently does not support decoding of interlaced images

Implementations§

Create a new decoder that decodes from the stream r

Loads the IFD at the specified index in the list, if one exists

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

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

Returns the byte_order

Reads a TIFF byte value

Reads a TIFF short value

Reads a TIFF sshort value

Reads a TIFF long value

Reads a TIFF slong value

Reads a TIFF float value

Reads a TIFF double value

Reads a string

Reads a TIFF IFA offset/value field

Reads a TIFF IFA offset/value field

Moves the cursor to the specified offset

Tries to retrieve a tag. Return Ok(None) if the tag is not present.

Tries to retrieve a tag and convert it to the desired unsigned type.

Tries to retrieve a vector of all a tag’s values and convert them to the desired unsigned type.

Tries to retrieve a tag and convert it to the desired unsigned type. Returns an error if the tag is not present.

Tries to retrieve a tag. Returns an error if the tag is not present

Tries to retrieve a tag and convert it to the desired type.

Tries to retrieve a tag and convert it to the desired type.

Tries to retrieve a tag and convert it to the desired type.

Tries to retrieve a tag and convert it to the desired type.

Tries to retrieve a tag and convert it to the desired type.

Tries to retrieve a tag and convert it to the desired type.

Tries to retrieve a tag and convert it to a 8bit vector.

Tries to retrieve a tag and convert it to a ascii vector.

The chunk type (Strips / Tiles) of the image

Number of strips in image

Number of tiles in image

Read the specified chunk (at index chunk_index) and return the binary data as a Vector.

Returns the default chunk size for the current image. Any given chunk in the image is at most as large as the value returned here. For the size of the data (chunk minus padding), use chunk_data_dimensions.

Returns the size of the data in the chunk with the specified index. This is the default size of the chunk, minus any padding.

Decodes the entire image and return it as a Vector

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.