pub struct ToSrgb { /* private fields */ }Expand description
Converts pixels in an ICC profile’s colour space to sRGB.
Implementations§
Source§impl ToSrgb
impl ToSrgb
Sourcepub fn from_profile(profile: &[u8]) -> Conversion
pub fn from_profile(profile: &[u8]) -> Conversion
What converting pixels in profile to sRGB takes.
Keep for anything this converter does not handle, which is never an
error: the profile stays with the pixels, and whatever displays them
can still manage their colour.
Sourcepub fn applies_to(&self, format: PixelFormat) -> bool
pub fn applies_to(&self, format: PixelFormat) -> bool
Whether pixels of format are what this profile describes: grey for
a grey profile, RGB for an RGB one, 8- or 16-bit or float.
Trait Implementations§
Source§impl Op for ToSrgb
impl Op for ToSrgb
Source§fn rescaled(&self) -> Option<Arc<dyn Op>>
fn rescaled(&self) -> Option<Arc<dyn Op>>
Pointwise, like modulate: resolution means nothing to it.
Source§fn output_descriptor(
&self,
inputs: &[ImageDescriptor],
) -> Result<ImageDescriptor>
fn output_descriptor( &self, inputs: &[ImageDescriptor], ) -> Result<ImageDescriptor>
Compute the output shape from the input shapes. Read more
Source§fn input_regions(
&self,
output: Region,
_inputs: &[ImageDescriptor],
) -> Result<Vec<Region>>
fn input_regions( &self, output: Region, _inputs: &[ImageDescriptor], ) -> Result<Vec<Region>>
The input regions needed to produce
output. Read moreSource§fn access_pattern(&self) -> AccessPattern
fn access_pattern(&self) -> AccessPattern
How this op reads its inputs; drives tile negotiation (ADR-0003). Read more
Auto Trait Implementations§
impl Freeze for ToSrgb
impl RefUnwindSafe for ToSrgb
impl Send for ToSrgb
impl Sync for ToSrgb
impl Unpin for ToSrgb
impl UnsafeUnpin for ToSrgb
impl UnwindSafe for ToSrgb
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more