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 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.

Trait Implementations

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

fn dimensions(&self) -> (u32, u32)
fn color_type(&self) -> ColorType
fn original_color_type(&self) -> ExtendedColorType
fn 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,

impl<T> Borrow<T> for OpenExrDecoder<R> where T: ?Sized,

impl<T> BorrowMut<T> for OpenExrDecoder<R> where T: ?Sized,

impl<T> From<T> for OpenExrDecoder<R>

impl<T> IntoEither for OpenExrDecoder<R>

impl<T> Pointable for OpenExrDecoder<R>

impl<T> Read<Exclusive, BecauseExclusive> for OpenExrDecoder<R> where T: ?Sized,

impl<T, U> Into<U> for OpenExrDecoder<R> where U: From<T>,

impl<T, U> TryFrom<U> for OpenExrDecoder<R> where U: Into<T>,

impl<T, U> TryInto<U> for OpenExrDecoder<R> where U: TryFrom<T>,