logo
pub trait ColorComponentMap<DestPixel, SrcComponent, DestComponent> {
    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

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