mirror of https://github.com/SixLabors/ImageSharp
37 changed files with 160 additions and 259 deletions
@ -1,11 +0,0 @@ |
|||||
// Copyright (c) Six Labors.
|
|
||||
// Licensed under the Six Labors Split License.
|
|
||||
|
|
||||
namespace SixLabors.ImageSharp; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Encapsulates the properties and methods that describe an image.
|
|
||||
/// </summary>
|
|
||||
public interface IImage : IImageInfo, IDisposable |
|
||||
{ |
|
||||
} |
|
||||
@ -1,34 +0,0 @@ |
|||||
// Copyright (c) Six Labors.
|
|
||||
// Licensed under the Six Labors Split License.
|
|
||||
|
|
||||
using SixLabors.ImageSharp.Formats; |
|
||||
using SixLabors.ImageSharp.Metadata; |
|
||||
|
|
||||
namespace SixLabors.ImageSharp; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Encapsulates properties that describe basic image information including dimensions, pixel type information
|
|
||||
/// and additional metadata.
|
|
||||
/// </summary>
|
|
||||
public interface IImageInfo |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Gets information about the image pixels.
|
|
||||
/// </summary>
|
|
||||
PixelTypeInfo PixelType { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the width.
|
|
||||
/// </summary>
|
|
||||
int Width { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the height.
|
|
||||
/// </summary>
|
|
||||
int Height { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the metadata of the image.
|
|
||||
/// </summary>
|
|
||||
ImageMetadata Metadata { get; } |
|
||||
} |
|
||||
@ -1,24 +0,0 @@ |
|||||
// Copyright (c) Six Labors.
|
|
||||
// Licensed under the Six Labors Split License.
|
|
||||
|
|
||||
namespace SixLabors.ImageSharp; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Extension methods that allow the addition of geometry calculating methods to the <see cref="IImageInfo"/> type
|
|
||||
/// </summary>
|
|
||||
public static class ImageInfoExtensions |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Gets the bounds of the image.
|
|
||||
/// </summary>
|
|
||||
/// <param name="info">The image info</param>
|
|
||||
/// <returns>The <see cref="Size"/></returns>
|
|
||||
public static Size Size(this IImageInfo info) => new(info.Width, info.Height); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the bounds of the image.
|
|
||||
/// </summary>
|
|
||||
/// <param name="info">The image info</param>
|
|
||||
/// <returns>The <see cref="Rectangle"/></returns>
|
|
||||
public static Rectangle Bounds(this IImageInfo info) => new(0, 0, info.Width, info.Height); |
|
||||
} |
|
||||
Loading…
Reference in new issue