[−][src]Struct tiff::decoder::Decoder
The representation of a TIFF decoder
Currently does not support decoding of interlaced images
Methods
impl<R: Read + Seek> Decoder<R>[src]
impl<R: Read + Seek> Decoder<R>pub fn new(r: R) -> TiffResult<Decoder<R>>[src]
pub fn new(r: R) -> TiffResult<Decoder<R>>Create a new decoder that decodes from the stream r
pub fn dimensions(&mut self) -> TiffResult<(u32, u32)>[src]
pub fn dimensions(&mut self) -> TiffResult<(u32, u32)>pub fn colortype(&mut self) -> TiffResult<ColorType>[src]
pub fn colortype(&mut self) -> TiffResult<ColorType>pub fn init(self) -> TiffResult<Decoder<R>>[src]
pub fn init(self) -> TiffResult<Decoder<R>>Initializes the decoder.
pub fn next_image(self) -> TiffResult<Decoder<R>>[src]
pub fn next_image(self) -> TiffResult<Decoder<R>>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.
pub fn more_images(&self) -> bool[src]
pub fn more_images(&self) -> boolReturns true if there is at least one more image available.
pub fn byte_order(&self) -> ByteOrder[src]
pub fn byte_order(&self) -> ByteOrderReturns the byte_order
pub fn read_short(&mut self) -> Result<u16, Error>[src]
pub fn read_short(&mut self) -> Result<u16, Error>Reads a TIFF short value
pub fn read_long(&mut self) -> Result<u32, Error>[src]
pub fn read_long(&mut self) -> Result<u32, Error>Reads a TIFF long value
pub fn read_string(&mut self, length: usize) -> Result<String, FromUtf8Error>[src]
pub fn read_string(&mut self, length: usize) -> Result<String, FromUtf8Error>Reads a string
pub fn read_offset(&mut self) -> Result<[u8; 4], Error>[src]
pub fn read_offset(&mut self) -> Result<[u8; 4], Error>Reads a TIFF IFA offset/value field
pub fn goto_offset(&mut self, offset: u32) -> Result<()>[src]
pub fn goto_offset(&mut self, offset: u32) -> Result<()>Moves the cursor to the specified offset
pub fn find_tag(&mut self, tag: Tag) -> TiffResult<Option<Value>>[src]
pub fn find_tag(&mut self, tag: Tag) -> TiffResult<Option<Value>>Tries to retrieve a tag.
Return Ok(None) if the tag is not present.
pub fn find_tag_u32(&mut self, tag: Tag) -> TiffResult<Option<u32>>[src]
pub fn find_tag_u32(&mut self, tag: Tag) -> TiffResult<Option<u32>>Tries to retrieve a tag and convert it to the desired type.
pub fn find_tag_u32_vec(&mut self, tag: Tag) -> TiffResult<Option<Vec<u32>>>[src]
pub fn find_tag_u32_vec(&mut self, tag: Tag) -> TiffResult<Option<Vec<u32>>>Tries to retrieve a tag and convert it to the desired type.
pub fn get_tag(&mut self, tag: Tag) -> TiffResult<Value>[src]
pub fn get_tag(&mut self, tag: Tag) -> TiffResult<Value>Tries to retrieve a tag. Returns an error if the tag is not present
pub fn get_tag_u32(&mut self, tag: Tag) -> TiffResult<u32>[src]
pub fn get_tag_u32(&mut self, tag: Tag) -> TiffResult<u32>Tries to retrieve a tag and convert it to the desired type.
pub fn get_tag_u32_vec(&mut self, tag: Tag) -> TiffResult<Vec<u32>>[src]
pub fn get_tag_u32_vec(&mut self, tag: Tag) -> TiffResult<Vec<u32>>Tries to retrieve a tag and convert it to the desired type.
pub fn read_image(&mut self) -> TiffResult<DecodingResult>[src]
pub fn read_image(&mut self) -> TiffResult<DecodingResult>Decodes the entire image and return it as a Vector
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more