pub struct Gamma { /* private fields */ }Expand description
Gamma: each colour channel becomes value^(1 / exponent), as libvips’
gamma defines it. An exponent above 1 brightens, below 1 darkens.
sharp’s gamma(g, gOut) is two of these around its resize: 1 / g
before (darken) and gOut after (brighten), which resamples in a more
nearly linear space.
Implementations§
Trait Implementations§
impl Copy for Gamma
Source§impl Op for Gamma
impl Op for Gamma
Source§fn rescaled(&self) -> Option<Arc<dyn Op>>
fn rescaled(&self) -> Option<Arc<dyn Op>>
A copy of this op fit for a graph rebuilt at a reduced input
resolution, or
None if this op must not be. Read moreSource§fn output_descriptor(
&self,
inputs: &[ImageDescriptor],
) -> Result<ImageDescriptor, PixelsError>
fn output_descriptor( &self, inputs: &[ImageDescriptor], ) -> Result<ImageDescriptor, PixelsError>
Compute the output shape from the input shapes. Read more
Source§fn input_regions(
&self,
output: Region,
_inputs: &[ImageDescriptor],
) -> Result<Vec<Region>, PixelsError>
fn input_regions( &self, output: Region, _inputs: &[ImageDescriptor], ) -> Result<Vec<Region>, PixelsError>
The input regions needed to produce
output. Read moreSource§fn compute(
&self,
inputs: &[Tile<'_>],
output: &mut TileMut<'_>,
) -> Result<(), PixelsError>
fn compute( &self, inputs: &[Tile<'_>], output: &mut TileMut<'_>, ) -> Result<(), PixelsError>
Source§fn access_pattern(&self) -> AccessPattern
fn access_pattern(&self) -> AccessPattern
How this op reads its inputs; drives tile negotiation (ADR-0003). Read more
impl StructuralPartialEq for Gamma
Auto Trait Implementations§
impl Freeze for Gamma
impl RefUnwindSafe for Gamma
impl Send for Gamma
impl Sync for Gamma
impl Unpin for Gamma
impl UnsafeUnpin for Gamma
impl UnwindSafe for Gamma
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