Struct OpenExrDecoder
pub struct OpenExrDecoder<R> { /* private fields */ }
An OpenEXR decoder. Immediately reads the meta data from the file.
Implementations
impl<R: BufRead + Seek> OpenExrDecoder<R>
fn new(source: R) -> ImageResult<Self>Create a decoder. Consumes the first few bytes of the source to extract image dimensions. Assumes the reader is buffered. In most cases, you should wrap your reader in a
BufReaderfor best performance. Loads an alpha channel if the file has alpha samples. Usewith_alpha_preferenceif you want to load or not load alpha unconditionally.fn with_alpha_preference(source: R, alpha_preference: Option<bool>) -> ImageResult<Self>Create a decoder. Consumes the first few bytes of the source to extract image dimensions. Assumes the reader is buffered. In most cases, you should wrap your reader in a
BufReaderfor best performance. If alpha preference is specified, an alpha channel will always be present or always be not present in the returned image. If alpha preference is none, the alpha channel will only be returned if it is found in the file.
Trait Implementations
impl<R: BufRead + Seek> ImageDecoder for OpenExrDecoder<R>
fn dimensions(&self) -> (u32, u32)fn color_type(&self) -> ColorTypefn original_color_type(&self) -> ExtendedColorTypefn read_image(self, unaligned_bytes: &mut [u8]) -> ImageResult<()>fn read_image_boxed(self: Box<Self>, buf: &mut [u8]) -> ImageResult<()>
impl<R: Debug> Debug for OpenExrDecoder<R>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<R> !RefUnwindSafe for OpenExrDecoder<R>
impl<R> !UnwindSafe for OpenExrDecoder<R>
impl<R> Freeze for OpenExrDecoder<R>
where
Reader<R>: Freeze,
impl<R> Send for OpenExrDecoder<R>
where
Reader<R>: Send,
impl<R> Sync for OpenExrDecoder<R>
where
Reader<R>: Sync,
impl<R> Unpin for OpenExrDecoder<R>
where
Reader<R>: Unpin,
impl<R> UnsafeUnpin for OpenExrDecoder<R>
where
Reader<R>: UnsafeUnpin,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for OpenExrDecoder<R>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for OpenExrDecoder<R>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for OpenExrDecoder<R>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for OpenExrDecoder<R>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for OpenExrDecoder<R>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for OpenExrDecoder<R>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> IntoEither for OpenExrDecoder<R>
impl<T> Pointable for OpenExrDecoder<R>
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for OpenExrDecoder<R>
where
T: ?Sized,
impl<T, U> Into<U> for OpenExrDecoder<R>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for OpenExrDecoder<R>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for OpenExrDecoder<R>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>