Struct image::hdr::HDRDecoder
[−]
[src]
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]
self,
f: F
) -> ImageResult<Vec<T>>
Consumes decoder and returns a vector of tranformed pixels
pub fn read_image_ldr(self) -> ImageResult<Vec<Rgb<u8>>>[src]
Consumes decoder and returns a vector of Rgb
pub fn read_image_hdr(self) -> ImageResult<Vec<Rgb<f32>>>[src]
Consumes decoder and returns a vector of Rgb
Trait Implementations
impl<R: Debug> Debug for HDRDecoder<R>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
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