# [−][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]

Consumes decoder and returns a vector of transformed pixels

#### `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?

#### `fn into_iter(self) -> Self::IntoIter`[src]

Creates an iterator from a value. Read more

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

#### `fn fmt(&self, f: &mut Formatter) -> Result`[src]

Formats the value using the given formatter. Read more

## Auto Trait Implementations

### `impl<R> Send for HDRDecoder<R> where
R: Send,`

### `impl<R> Unpin for HDRDecoder<R> where
R: Unpin,`

### `impl<R> Sync for HDRDecoder<R> where
R: Sync,`

### `impl<R> UnwindSafe for HDRDecoder<R> where
R: UnwindSafe,`

### `impl<R> RefUnwindSafe for HDRDecoder<R> where
R: RefUnwindSafe,`

## Blanket Implementations

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

#### `fn into(self) -> U`[src]

Performs the conversion.

### `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?

#### `fn into_iter(self) -> I`[src]

Creates an iterator from a value. Read more

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

#### `fn from(t: T) -> T`[src]

Performs the conversion.

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

#### `fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`[src]

Performs the conversion.

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

#### `fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`[src]

Performs the conversion.

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

#### `fn borrow_mut(&mut self) -> &mut T`[src]

Mutably borrows from an owned value. Read more

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

#### `fn borrow(&self) -> &T`[src]

Immutably borrows from an owned value. Read more

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

#### `fn type_id(&self) -> TypeId`[src]

Gets the `TypeId` of `self`. Read more

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

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)