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