Struct image::hdr::HdrDecoder [−][src]
pub struct HdrDecoder<R> { /* fields omitted */ }
An Radiance HDR decoder
Implementations
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,
output_slice: &mut [T]
) -> ImageResult<()>
[src]
self,
f: F,
output_slice: &mut [T]
) -> ImageResult<()>
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
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]
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]
Auto Trait Implementations
impl<R> RefUnwindSafe for HdrDecoder<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for HdrDecoder<R> where
R: Send,
R: Send,
impl<R> Sync for HdrDecoder<R> where
R: Sync,
R: Sync,
impl<R> Unpin for HdrDecoder<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for HdrDecoder<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,