[−][src]Struct nannou::image::webp::WebpDecoder
A Representation of a Webp Image format decoder.
Methods
impl<R> WebpDecoder<R> where
R: Read,
[src]
R: Read,
pub fn new(r: R) -> Result<WebpDecoder<R>, ImageError>
[src]
Create a new WebpDecoder from the Reader r
.
This function takes ownership of the Reader.
Trait Implementations
impl<R> ImageDecoder for WebpDecoder<R> where
R: Read,
[src]
R: Read,
type Reader = Cursor<Vec<u8>>
The type of reader produced by into_reader
.
fn dimensions(&self) -> (u64, u64)
[src]
fn colortype(&self) -> ColorType
[src]
fn into_reader(
self
) -> Result<<WebpDecoder<R> as ImageDecoder>::Reader, ImageError>
[src]
self
) -> Result<<WebpDecoder<R> as ImageDecoder>::Reader, ImageError>
fn read_image(self) -> Result<Vec<u8>, ImageError>
[src]
fn row_bytes(&self) -> u64
[src]
Returns the number of bytes in a single row of the image. All decoders will pad image rows to a byte boundary. Read more
fn total_bytes(&self) -> u64
[src]
Returns the total number of bytes in the image.
fn scanline_bytes(&self) -> u64
[src]
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,
progress_callback: F
) -> Result<Vec<u8>, ImageError> where
F: Fn(Progress),
[src]
self,
progress_callback: F
) -> Result<Vec<u8>, 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> Send for WebpDecoder<R> where
R: Send,
R: Send,
impl<R> Sync for WebpDecoder<R> where
R: Sync,
R: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.