|
|
|
@ -24,24 +24,7 @@ namespace ImageSharp |
|
|
|
public static Image<TColor> Apply<TColor>(this Image<TColor> source, IImageProcessor<TColor> processor) |
|
|
|
where TColor : struct, IPackedPixel, IEquatable<TColor> |
|
|
|
{ |
|
|
|
return Apply(source, source.Bounds, processor); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies the processor to the image.
|
|
|
|
/// <remarks>This method does not resize the target image.</remarks>
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TColor">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="sourceRectangle">
|
|
|
|
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to draw.
|
|
|
|
/// </param>
|
|
|
|
/// <param name="processor">The processors to apply to the image.</param>
|
|
|
|
/// <returns>The <see cref="Image{TColor}"/>.</returns>
|
|
|
|
public static Image<TColor> Apply<TColor>(this Image<TColor> source, Rectangle sourceRectangle, IImageProcessor<TColor> processor) |
|
|
|
where TColor : struct, IPackedPixel, IEquatable<TColor> |
|
|
|
{ |
|
|
|
source.ApplyProcessor(processor, sourceRectangle); |
|
|
|
source.ApplyProcessor(processor, source.Bounds); |
|
|
|
return source; |
|
|
|
} |
|
|
|
} |
|
|
|
|