HdrEncoder

Struct HdrEncoder 

Source
pub struct HdrEncoder<W>
where W: Write,
{ /* private fields */ }
Expand description

Radiance HDR encoder

Implementations§

Source§

impl<W> HdrEncoder<W>
where W: Write,

Source

pub fn new(w: W) -> HdrEncoder<W>

Creates encoder

Source

pub fn encode( self, rgb: &[Rgb<f32>], width: usize, height: usize, ) -> Result<(), ImageError>

Encodes the image rgb that has dimensions width and height

Trait Implementations§

Source§

impl<W> ImageEncoder for HdrEncoder<W>
where W: Write,

Source§

fn write_image( self, unaligned_bytes: &[u8], width: u32, height: u32, color_type: ExtendedColorType, ) -> Result<(), ImageError>

Writes all the bytes in an image to the encoder. Read more
Source§

fn set_icc_profile( &mut self, icc_profile: Vec<u8>, ) -> Result<(), UnsupportedError>

Set the ICC profile to use for the image. Read more

Auto Trait Implementations§

§

impl<W> Freeze for HdrEncoder<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for HdrEncoder<W>
where W: RefUnwindSafe,

§

impl<W> Send for HdrEncoder<W>
where W: Send,

§

impl<W> Sync for HdrEncoder<W>
where W: Sync,

§

impl<W> Unpin for HdrEncoder<W>
where W: Unpin,

§

impl<W> UnwindSafe for HdrEncoder<W>
where W: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> RoundFrom<T> for T

Source§

fn round_from(x: T) -> T

Performs the conversion.
Source§

impl<T, U> RoundInto<U> for T
where U: RoundFrom<T>,

Source§

fn round_into(self) -> U

Performs the conversion.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.