diff --git a/src/ImageSharp/Image/ImageProcessingExtensions.cs b/src/ImageSharp/Image/ImageProcessingExtensions.cs index 3d33e73c45..68a3ab2160 100644 --- a/src/ImageSharp/Image/ImageProcessingExtensions.cs +++ b/src/ImageSharp/Image/ImageProcessingExtensions.cs @@ -41,27 +41,14 @@ namespace ImageSharp internal static Image Process(this Image source, Rectangle sourceRectangle, IImageProcessor processor) where TColor : struct, IPackedPixel, IEquatable { - return PerformAction(source, (sourceImage) => processor.Apply(sourceImage, sourceRectangle)); - } - - /// - /// Performs the given action on the source image. - /// - /// The pixel format. - /// The image to perform the action against. - /// The to perform against the image. - /// The . - private static Image PerformAction(Image source, Action> action) - where TColor : struct, IPackedPixel, IEquatable - { - action(source); + processor.Apply(source, sourceRectangle); foreach (ImageFrame sourceFrame in source.Frames) { - action(sourceFrame); + processor.Apply(sourceFrame, sourceRectangle); } return source; } } -} +} \ No newline at end of file