Struct titanium::desktop::gui::libdruid::piet::image_crate::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: Read,
impl<R> IntoIterator for HdrDecoder<R>where R: Read,
§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§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.