[−][src]Struct nannou::image::hdr::HDRAdapter
Adapter to conform to ImageDecoder
trait
Methods
impl<R> HDRAdapter<R> where
R: BufRead,
[src]
R: BufRead,
pub fn new(r: R) -> Result<HDRAdapter<R>, ImageError>
[src]
Creates adapter
pub fn new_nonstrict(r: R) -> Result<HDRAdapter<R>, ImageError>
[src]
Allows reading old Radiance HDR images
Trait Implementations
impl<R> ImageDecoder for HDRAdapter<R> where
R: BufRead,
[src]
R: BufRead,
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<<HDRAdapter<R> as ImageDecoder>::Reader, ImageError>
[src]
self
) -> Result<<HDRAdapter<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
impl<R> Debug for HDRAdapter<R> where
R: BufRead + Debug,
[src]
R: BufRead + Debug,
impl<R> ImageDecoderExt for HDRAdapter<R> where
R: Seek + BufRead,
[src]
R: Seek + BufRead,
fn read_rect_with_progress<F>(
&mut self,
x: u64,
y: u64,
width: u64,
height: u64,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
[src]
&mut self,
x: u64,
y: u64,
width: u64,
height: u64,
buf: &mut [u8],
progress_callback: F
) -> Result<(), ImageError> where
F: Fn(Progress),
fn read_rect(
&mut self,
x: u64,
y: u64,
width: u64,
height: u64,
buf: &mut [u8]
) -> Result<(), ImageError>
[src]
&mut self,
x: u64,
y: u64,
width: u64,
height: u64,
buf: &mut [u8]
) -> Result<(), ImageError>
Read a rectangular section of the image.
Auto Trait Implementations
impl<R> Send for HDRAdapter<R> where
R: Send,
R: Send,
impl<R> Sync for HDRAdapter<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
.