Struct plot_interface::dependency::image::codecs::tiff::TiffDecoder
[−]Expand description
Decoder for TIFF images.
Implementations
impl<R> TiffDecoder<R> where
R: Read + Seek,
impl<R> TiffDecoder<R> where
R: Read + Seek,
pub fn new(r: R) -> Result<TiffDecoder<R>, ImageError>
pub fn new(r: R) -> Result<TiffDecoder<R>, ImageError>
Create a new TiffDecoder.
Trait Implementations
impl<'a, R> ImageDecoder<'a> for TiffDecoder<R> where
R: 'a + Read + Seek,
impl<'a, R> ImageDecoder<'a> for TiffDecoder<R> where
R: 'a + Read + Seek,
type Reader = TiffReader<R>
type Reader = TiffReader<R>
The type of reader produced by into_reader
.
fn dimensions(&self) -> (u32, u32)
fn dimensions(&self) -> (u32, u32)
Returns a tuple containing the width and height of the image
fn color_type(&self) -> ColorType
fn color_type(&self) -> ColorType
Returns the color type of the image data produced by this decoder
fn set_limits(&mut self, limits: Limits) -> Result<(), ImageError>
fn set_limits(&mut self, limits: Limits) -> Result<(), ImageError>
fn into_reader(
self
) -> Result<<TiffDecoder<R> as ImageDecoder<'a>>::Reader, ImageError>
fn into_reader(
self
) -> Result<<TiffDecoder<R> as ImageDecoder<'a>>::Reader, ImageError>
Returns a reader that can be used to obtain the bytes of the image. For the best
performance, always try to read at least scanline_bytes
from the reader at a time. Reading
fewer bytes will cause the reader to perform internal buffering. Read more
fn read_image(self, buf: &mut [u8]) -> Result<(), ImageError>
fn read_image(self, buf: &mut [u8]) -> Result<(), ImageError>
Returns all the bytes in the image. Read more
fn original_color_type(&self) -> ExtendedColorType
fn original_color_type(&self) -> ExtendedColorType
Retuns the color type of the image file before decoding
fn total_bytes(&self) -> u64
fn total_bytes(&self) -> u64
Returns the total number of bytes in the decoded image. Read more
fn scanline_bytes(&self) -> u64
fn scanline_bytes(&self) -> u64
Returns the minimum number of bytes that can be efficiently read from this decoder. This may
be as few as 1 or as many as total_bytes()
. Read more
fn read_image_with_progress<F>(
self,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
fn read_image_with_progress<F>(
self,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
Same as read_image
but periodically calls the provided callback to give updates on loading
progress. Read more
Auto Trait Implementations
impl<R> RefUnwindSafe for TiffDecoder<R> where
R: RefUnwindSafe,
impl<R> Send for TiffDecoder<R> where
R: Send,
impl<R> Sync for TiffDecoder<R> where
R: Sync,
impl<R> Unpin for TiffDecoder<R> where
R: Unpin,
impl<R> UnwindSafe for TiffDecoder<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
impl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
sourcefn vectorized_into(self) -> Target
fn vectorized_into(self) -> Target
Performs the conversion.