mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
31 lines
1.2 KiB
// Copyright (c) Six Labors and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
using SixLabors.ImageSharp.PixelFormats;
|
|
using SixLabors.Primitives;
|
|
|
|
namespace SixLabors.ImageSharp
|
|
{
|
|
/// <summary>
|
|
/// Encapsulates methods to alter the pixels of an image.
|
|
/// </summary>
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
public interface IImageProcessor<TPixel>
|
|
where TPixel : struct, IPixel<TPixel>
|
|
{
|
|
/// <summary>
|
|
/// Applies the process to the specified portion of the specified <see cref="ImageFrame{TPixel}"/>.
|
|
/// </summary>
|
|
/// <param name="source">The source image. Cannot be null.</param>
|
|
/// <param name="sourceRectangle">
|
|
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to draw.
|
|
/// </param>
|
|
/// <exception cref="System.ArgumentNullException">
|
|
/// <paramref name="source"/> is null.
|
|
/// </exception>
|
|
/// <exception cref="System.ArgumentException">
|
|
/// <paramref name="sourceRectangle"/> doesnt fit the dimension of the image.
|
|
/// </exception>
|
|
void Apply(Image<TPixel> source, Rectangle sourceRectangle);
|
|
}
|
|
}
|
|
|