|
|
|
@ -7,7 +7,7 @@ using SixLabors.ImageSharp.Processing.Processors.Transforms; |
|
|
|
namespace SixLabors.ImageSharp.Processing |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Defines extensions that allow the application of auto-orientation operations to an <see cref="Image{TPixel}"/>
|
|
|
|
/// Defines extensions that allow the application of auto-orientation operations to an <see cref="Image"/>
|
|
|
|
/// using Mutate/Clone.
|
|
|
|
/// </summary>
|
|
|
|
public static class AutoOrientExtensions |
|
|
|
@ -15,11 +15,9 @@ namespace SixLabors.ImageSharp.Processing |
|
|
|
/// <summary>
|
|
|
|
/// Adjusts an image so that its orientation is suitable for viewing. Adjustments are based on EXIF metadata embedded in the image.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image to auto rotate.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixel}"/></returns>
|
|
|
|
public static IImageProcessingContext<TPixel> AutoOrient<TPixel>(this IImageProcessingContext<TPixel> source) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.ApplyProcessor(new AutoOrientProcessor<TPixel>()); |
|
|
|
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
|
|
|
|
public static IImageProcessingContext AutoOrient(this IImageProcessingContext source) |
|
|
|
=> source.ApplyProcessor(new AutoOrientProcessor()); |
|
|
|
} |
|
|
|
} |