[][src]Struct image::hdr::HDRDecoder

pub struct HDRDecoder<R> { /* fields omitted */ }

An Radiance HDR decoder

Methods

impl<R: BufRead> HDRDecoder<R>[src]

pub fn new(reader: R) -> ImageResult<HDRDecoder<R>>[src]

Reads Radiance HDR image header from stream r if the header is valid, creates HDRDecoder strict mode is enabled

pub fn with_strictness(reader: R, strict: bool) -> ImageResult<HDRDecoder<R>>[src]

Reads Radiance HDR image header from stream reader, if the header is valid, creates HDRDecoder.

strict enables strict mode

Warning! Reading wrong file in non-strict mode could consume file size worth of memory in the process.

pub fn metadata(&self) -> HDRMetadata[src]

Returns file metadata. Refer to HDRMetadata for details.

pub fn read_image_native(self) -> ImageResult<Vec<RGBE8Pixel>>[src]

Consumes decoder and returns a vector of RGBE8 pixels

pub fn read_image_transform<T: Send, F: Send + Sync + Fn(RGBE8Pixel) -> T>(
    self,
    f: F
) -> ImageResult<Vec<T>>
[src]

Deprecated since 0.21.3:

For trivial types T this interface is less safe and less efficient than one takingan output slice. Semantics may be confusing for non-trivial types. Consider upgrading to v0.22.

Consumes decoder and returns a vector of transformed pixels.

Note: This method should not be called with a parameter T that has a Drop impl. In case of error or panic, it will never call this Drop implementation even for pixels that have already been successfully decoded.

pub fn read_image_ldr(self) -> ImageResult<Vec<Rgb<u8>>>[src]

Consumes decoder and returns a vector of Rgb pixels. scale = 1, gamma = 2.2

pub fn read_image_hdr(self) -> ImageResult<Vec<Rgb<f32>>>[src]

Consumes decoder and returns a vector of Rgb pixels.

Trait Implementations

impl<R: BufRead> IntoIterator for HDRDecoder<R>[src]

type Item = ImageResult<RGBE8Pixel>

The type of the elements being iterated over.

type IntoIter = HDRImageDecoderIterator<R>

Which kind of iterator are we turning this into?

impl<R: Debug> Debug for HDRDecoder<R>[src]

Auto Trait Implementations

impl<R> Unpin for HDRDecoder<R> where
    R: Unpin

impl<R> Sync for HDRDecoder<R> where
    R: Sync

impl<R> Send for HDRDecoder<R> where
    R: Send

impl<R> UnwindSafe for HDRDecoder<R> where
    R: UnwindSafe

impl<R> RefUnwindSafe for HDRDecoder<R> where
    R: RefUnwindSafe

Blanket Implementations

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.