Struct matrix_qrcode::image::codecs::hdr::HdrDecoder
[−]pub struct HdrDecoder<R> { /* private fields */ }
Expand description
An Radiance HDR decoder
Implementations
impl<R> HdrDecoder<R> where
R: BufRead,
impl<R> HdrDecoder<R> where
R: BufRead,
pub fn new(reader: R) -> Result<HdrDecoder<R>, ImageError>
pub fn new(reader: R) -> Result<HdrDecoder<R>, ImageError>
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
) -> Result<HdrDecoder<R>, ImageError>
pub fn with_strictness(
reader: R,
strict: bool
) -> Result<HdrDecoder<R>, ImageError>
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
pub fn metadata(&self) -> HdrMetadata
Returns file metadata. Refer to HDRMetadata
for details.
pub fn read_image_native(self) -> Result<Vec<Rgbe8Pixel, Global>, ImageError>
pub fn read_image_native(self) -> Result<Vec<Rgbe8Pixel, Global>, ImageError>
Consumes decoder and returns a vector of RGBE8 pixels
pub fn read_image_transform<T, F>(
self,
f: F,
output_slice: &mut [T]
) -> Result<(), ImageError> where
T: Send,
F: Send + Sync + Fn(Rgbe8Pixel) -> T,
pub fn read_image_transform<T, F>(
self,
f: F,
output_slice: &mut [T]
) -> Result<(), ImageError> where
T: Send,
F: Send + Sync + Fn(Rgbe8Pixel) -> T,
Consumes decoder and returns a vector of transformed pixels
pub fn read_image_ldr(self) -> Result<Vec<Rgb<u8>, Global>, ImageError>
pub fn read_image_ldr(self) -> Result<Vec<Rgb<u8>, Global>, ImageError>
Consumes decoder and returns a vector of Rgb
pub fn read_image_hdr(self) -> Result<Vec<Rgb<f32>, Global>, ImageError>
pub fn read_image_hdr(self) -> Result<Vec<Rgb<f32>, Global>, ImageError>
Consumes decoder and returns a vector of Rgb
Trait Implementations
impl<R> Debug for HdrDecoder<R> where
R: Debug,
impl<R> Debug for HdrDecoder<R> where
R: Debug,
impl<R> IntoIterator for HdrDecoder<R> where
R: BufRead,
impl<R> IntoIterator for HdrDecoder<R> where
R: BufRead,
type Item = Result<Rgbe8Pixel, ImageError>
type Item = Result<Rgbe8Pixel, ImageError>
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?
fn into_iter(self) -> <HdrDecoder<R> as IntoIterator>::IntoIter
fn into_iter(self) -> <HdrDecoder<R> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
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 · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more