Browse Source

Merge pull request #1929 from jz5/metadata

Change the constructor of PixelTypeInfo and ImageMetadata from internal to public so that a user can implement IImageInfo
pull/1936/head
James Jackson-South 4 years ago
committed by GitHub
parent
commit
d918502d87
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/ImageSharp/Formats/PixelTypeInfo.cs
  2. 2
      src/ImageSharp/Metadata/ImageMetadata.cs

13
src/ImageSharp/Formats/PixelTypeInfo.cs

@ -15,8 +15,17 @@ namespace SixLabors.ImageSharp.Formats
/// Initializes a new instance of the <see cref="PixelTypeInfo"/> class.
/// </summary>
/// <param name="bitsPerPixel">Color depth, in number of bits per pixel.</param>
/// <param name="alpha">Tthe pixel alpha transparency behavior.</param>
internal PixelTypeInfo(int bitsPerPixel, PixelAlphaRepresentation? alpha = null)
public PixelTypeInfo(int bitsPerPixel)
{
this.BitsPerPixel = bitsPerPixel;
}
/// <summary>
/// Initializes a new instance of the <see cref="PixelTypeInfo"/> class.
/// </summary>
/// <param name="bitsPerPixel">Color depth, in number of bits per pixel.</param>
/// <param name="alpha">The pixel alpha transparency behavior.</param>
public PixelTypeInfo(int bitsPerPixel, PixelAlphaRepresentation alpha)
{
this.BitsPerPixel = bitsPerPixel;
this.AlphaRepresentation = alpha;

2
src/ImageSharp/Metadata/ImageMetadata.cs

@ -40,7 +40,7 @@ namespace SixLabors.ImageSharp.Metadata
/// <summary>
/// Initializes a new instance of the <see cref="ImageMetadata"/> class.
/// </summary>
internal ImageMetadata()
public ImageMetadata()
{
this.horizontalResolution = DefaultHorizontalResolution;
this.verticalResolution = DefaultVerticalResolution;

Loading…
Cancel
Save