Browse Source

Fix recursion plus cleanup

af/merge-core
James Jackson-South 9 years ago
parent
commit
8374316bcb
  1. 19
      src/ImageSharp/Advanced/ImageExtensions.cs

19
src/ImageSharp/Advanced/ImageExtensions.cs

@ -2,20 +2,15 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Advanced namespace SixLabors.ImageSharp.Advanced
{ {
/// <summary> /// <summary>
/// Extension methods over Image{TPixel} /// Extension methods over Image{TPixel}
/// </summary> /// </summary>
public static partial class ImageExtensions public static class ImageExtensions
{ {
/// <summary> /// <summary>
/// Gets the representation of the pixels as an area of contiguous memory in the given pixel format. /// Gets the representation of the pixels as an area of contiguous memory in the given pixel format.
@ -28,7 +23,7 @@ namespace SixLabors.ImageSharp.Advanced
=> GetSpan(source); => GetSpan(source);
/// <summary> /// <summary>
/// Gets a <see cref="Span{TPixal}"/> representing the row 'y' beginning from the the first pixel on that row. /// Gets the representation of the pixels as an area of contiguous memory at row 'y' beginning from the the first pixel on that row.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The type of the pixel.</typeparam> /// <typeparam name="TPixel">The type of the pixel.</typeparam>
/// <param name="source">The source.</param> /// <param name="source">The source.</param>
@ -39,17 +34,17 @@ namespace SixLabors.ImageSharp.Advanced
=> GetSpan(source, row); => GetSpan(source, row);
/// <summary> /// <summary>
/// Gets the configuration. /// Gets the configuration for the image.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The Pixel format.</typeparam> /// <typeparam name="TPixel">The Pixel format.</typeparam>
/// <param name="source">The source image</param> /// <param name="source">The source image</param>
/// <returns>Returns the configuration.</returns> /// <returns>Returns the configuration.</returns>
public static Configuration GetConfiguration<TPixel>(this Image<TPixel> source) public static Configuration GetConfiguration<TPixel>(this Image<TPixel> source)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
=> GetConfiguration(source); => GetConfiguration((IConfigurable)source);
/// <summary> /// <summary>
/// Gets the span. /// Gets the span to the backing buffer.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The type of the pixel.</typeparam> /// <typeparam name="TPixel">The type of the pixel.</typeparam>
/// <param name="source">The source.</param> /// <param name="source">The source.</param>
@ -59,7 +54,7 @@ namespace SixLabors.ImageSharp.Advanced
=> source.PixelBuffer.Span; => source.PixelBuffer.Span;
/// <summary> /// <summary>
/// Gets the span. /// Gets the span to the backing buffer at the given row.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The type of the pixel.</typeparam> /// <typeparam name="TPixel">The type of the pixel.</typeparam>
/// <param name="source">The source.</param> /// <param name="source">The source.</param>
@ -72,7 +67,7 @@ namespace SixLabors.ImageSharp.Advanced
=> GetSpan(source.PixelBuffer, row); => GetSpan(source.PixelBuffer, row);
/// <summary> /// <summary>
/// Gets the span. /// Gets the span to the backing buffer at the given row.
/// </summary> /// </summary>
/// <typeparam name="TPixel">The type of the pixel.</typeparam> /// <typeparam name="TPixel">The type of the pixel.</typeparam>
/// <param name="source">The source.</param> /// <param name="source">The source.</param>

Loading…
Cancel
Save