Struct openexr::core::preview_image::PreviewRgba [−][src]
Expand description
Holds the value of a PreviewImage pixel
Intensity is proportional to pow(x/255, 2.2)
for r
, g
, and b
components.
Fields
r: u8
Red component of the pixel’s color.
Intensity is proportional to pow(x/255, 2.2)
.
g: u8
Green component of the pixel’s color.
Intensity is proportional to pow(x/255, 2.2)
.
b: u8
Blue component of the pixel’s color.
Intensity is proportional to pow(x/255, 2.2)
.
a: u8
The pixel’s alpha. Transparent -> 0. Opaque -> 255.
Implementations
Creates a PreviewRgba
from RGB and Alpha u8
values
Creates a PreviewRgba
from RGB and Alpha f16
values
Note
Applies gamma correction with the formula
clamp( pow(5.5555 * max(0, x), 0.4545) * 84.66), 0, 255)
Creates a PreviewRgba
from RGB and Alpha f32
values
Note
Applies gamma correction with the formula
clamp( pow(5.5555 * max(0, x), 0.4545) * 84.66), 0, 255)
Creates a PreviewRgba
where all components have value 0 (zero)
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for PreviewRgba
impl Send for PreviewRgba
impl Sync for PreviewRgba
impl Unpin for PreviewRgba
impl UnwindSafe for PreviewRgba
Blanket Implementations
Mutably borrows from an owned value. Read more