pub trait ColorComponentMap<DestPixel, SrcComponent, DestComponent> {
    // Required method
    fn map_c<Callback>(&self, f: Callback) -> DestPixel
       where Callback: FnMut(SrcComponent) -> DestComponent;
}
Expand description

Same as ComponentMap, but doesn’t change the alpha channel (if there’s any alpha).

Required Methods§

source

fn map_c<Callback>(&self, f: Callback) -> DestPixelwhere Callback: FnMut(SrcComponent) -> DestComponent,

Convenience function for applying the same formula to every rgb/gray component, but skipping the alpha component.

Note that it returns the pixel directly, not an Interator.

Implementors§

source§

impl<T: Copy, A: Copy, B> ColorComponentMap<BGRA<B, A>, T, B> for BGRA<T, A>

source§

impl<T: Copy, A: Copy, B> ColorComponentMap<GrayAlpha<B, A>, T, B> for GrayAlpha<T, A>

source§

impl<T: Copy, A: Copy, B> ColorComponentMap<RGBA<B, A>, T, B> for RGBA<T, A>

source§

impl<T: Copy, B> ColorComponentMap<BGR<B>, T, B> for BGR<T>

source§

impl<T: Copy, B> ColorComponentMap<Gray<B>, T, B> for Gray<T>

source§

impl<T: Copy, B> ColorComponentMap<RGB<B>, T, B> for RGB<T>