Struct OpenExrDecoder

struct OpenExrDecoder<R> { ... }

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 BufReader for best performance. Loads an alpha channel if the file has alpha samples. Use with_alpha_preference if 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 BufReader for 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.

impl<R> Freeze for OpenExrDecoder<R>

impl<R> RefUnwindSafe for OpenExrDecoder<R>

impl<R> Send for OpenExrDecoder<R>

impl<R> Sync for OpenExrDecoder<R>

impl<R> Unpin for OpenExrDecoder<R>

impl<R> UnwindSafe for OpenExrDecoder<R>

impl<R: $crate::fmt::Debug> Debug for OpenExrDecoder<R>

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl<R: BufRead + Seek> ImageDecoder for OpenExrDecoder<R>

fn dimensions(self: &Self) -> (u32, u32)
fn color_type(self: &Self) -> ColorType
fn original_color_type(self: &Self) -> ExtendedColorType
fn read_image(self: Self, unaligned_bytes: &mut [u8]) -> ImageResult<()>
fn read_image_boxed(self: Box<Self>, buf: &mut [u8]) -> ImageResult<()>

impl<T> Any for OpenExrDecoder<R>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for OpenExrDecoder<R>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for OpenExrDecoder<R>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for OpenExrDecoder<R>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for OpenExrDecoder<R>

unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T, U> Into for OpenExrDecoder<R>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for OpenExrDecoder<R>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for OpenExrDecoder<R>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>