Type Alias image::codecs::hdr::RGBE8Pixel

source ·
pub type RGBE8Pixel = Rgbe8Pixel;
👎Deprecated: Use Rgbe8Pixel instead
Expand description

Refer to wikipedia

An alias of Rgbe8Pixel.

TODO: remove

Aliased Type§

struct RGBE8Pixel {
    pub c: [u8; 3],
    pub e: u8,
}

Fields§

§c: [u8; 3]

Color components

§e: u8

Exponent

Implementations

source§

impl Rgbe8Pixel

source

pub fn to_hdr(self) -> Rgb<f32>

Converts RGBE8Pixel into Rgb<f32> linearly

source

pub fn to_ldr<T: Primitive + Zero>(self) -> Rgb<T>

Converts RGBE8Pixel into Rgb<T> with scale=1 and gamma=2.2

color_ldr = (color_hdr*scale)gamma

§Panic

Panics when T::max_value() cannot be represented as f32.

source

pub fn to_ldr_scale_gamma<T: Primitive + Zero>( self, scale: f32, gamma: f32, ) -> Rgb<T>

Converts RGBE8Pixel into Rgb using provided scale and gamma

color_ldr = (color_hdr*scale)gamma

§Panic

Panics when T::max_value() cannot be represented as f32. Panics when scale or gamma is NaN

Trait Implementations

source§

impl Clone for Rgbe8Pixel

source§

fn clone(&self) -> Rgbe8Pixel

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Rgbe8Pixel

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Rgbe8Pixel

source§

fn default() -> Rgbe8Pixel

Returns the “default value” for a type. Read more
source§

impl PartialEq for Rgbe8Pixel

source§

fn eq(&self, other: &Rgbe8Pixel) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Rgbe8Pixel

source§

impl Eq for Rgbe8Pixel

source§

impl StructuralPartialEq for Rgbe8Pixel