public static void MutateRows(this IPixelRows pixels, ImagingConfig imagingConfig, PixelRowsMutatorCallback mutator) { if (mutator == null) { throw new ArgumentNullException(nameof(mutator)); } mutator.Invoke(new PixelRowsContext(imagingConfig, pixels)); }
public static void MutateRows <TPixel>( this IPixelRows <TPixel> pixels, ImagingConfig imagingConfig, PixelRowsMutatorCallback <TPixel> mutator) where TPixel : unmanaged, IPixel { if (mutator == null) { throw new ArgumentNullException(nameof(mutator)); } mutator.Invoke(new PixelRowsContext <TPixel>(imagingConfig, pixels)); }