pub struct HdrDecoder<R> { /* private fields */ }
Expand description
An Radiance HDR decoder
Implementations
sourceimpl<R: BufRead> HdrDecoder<R>
impl<R: BufRead> HdrDecoder<R>
sourcepub fn new(reader: R) -> ImageResult<HdrDecoder<R>>
pub fn new(reader: R) -> ImageResult<HdrDecoder<R>>
Reads Radiance HDR image header from stream r
if the header is valid, creates HdrDecoder
strict mode is enabled
sourcepub fn with_strictness(reader: R, strict: bool) -> ImageResult<HdrDecoder<R>>
pub fn with_strictness(reader: R, strict: bool) -> ImageResult<HdrDecoder<R>>
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.
sourcepub fn metadata(&self) -> HdrMetadata
pub fn metadata(&self) -> HdrMetadata
Returns file metadata. Refer to HDRMetadata
for details.
sourcepub fn read_image_native(self) -> ImageResult<Vec<Rgbe8Pixel>>
pub fn read_image_native(self) -> ImageResult<Vec<Rgbe8Pixel>>
Consumes decoder and returns a vector of RGBE8 pixels
sourcepub fn read_image_transform<T: Send, F: Send + Sync + Fn(Rgbe8Pixel) -> T>(
self,
f: F,
output_slice: &mut [T]
) -> ImageResult<()>
pub fn read_image_transform<T: Send, F: Send + Sync + Fn(Rgbe8Pixel) -> T>(
self,
f: F,
output_slice: &mut [T]
) -> ImageResult<()>
Consumes decoder and returns a vector of transformed pixels
sourcepub fn read_image_ldr(self) -> ImageResult<Vec<Rgb<u8>>>
pub fn read_image_ldr(self) -> ImageResult<Vec<Rgb<u8>>>
Consumes decoder and returns a vector of Rgb
sourcepub fn read_image_hdr(self) -> ImageResult<Vec<Rgb<f32>>>
pub fn read_image_hdr(self) -> ImageResult<Vec<Rgb<f32>>>
Consumes decoder and returns a vector of Rgb
Trait Implementations
sourceimpl<R: Debug> Debug for HdrDecoder<R>
impl<R: Debug> Debug for HdrDecoder<R>
sourceimpl<R: BufRead> IntoIterator for HdrDecoder<R>
impl<R: BufRead> IntoIterator for HdrDecoder<R>
type Item = ImageResult<Rgbe8Pixel>
type Item = ImageResult<Rgbe8Pixel>
The type of the elements being iterated over.
type IntoIter = HdrImageDecoderIterator<R>
type IntoIter = HdrImageDecoderIterator<R>
Which kind of iterator are we turning this into?
Auto Trait Implementations
impl<R> RefUnwindSafe for HdrDecoder<R> where
R: RefUnwindSafe,
impl<R> Send for HdrDecoder<R> where
R: Send,
impl<R> Sync for HdrDecoder<R> where
R: Sync,
impl<R> Unpin for HdrDecoder<R> where
R: Unpin,
impl<R> UnwindSafe for HdrDecoder<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more