// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp { using System; using Processing; using Processing.Processors; /// /// Extension methods for the type. /// public static partial class ImageExtensions { /// /// Alters the hue component of the image. /// /// The pixel format. /// The image this method extends. /// The angle in degrees to adjust the image. /// The . public static Image Hue(this Image source, float degrees) where TColor : struct, IPackedPixel, IEquatable { return Hue(source, degrees, source.Bounds); } /// /// Alters the hue component of the image. /// /// The pixel format. /// The image this method extends. /// The angle in degrees to adjust the image. /// /// The structure that specifies the portion of the image object to alter. /// /// The . public static Image Hue(this Image source, float degrees, Rectangle rectangle) where TColor : struct, IPackedPixel, IEquatable { return source.Apply(rectangle, new HueProcessor(degrees)); } } }