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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
3 deletions
-
src/ImageSharp/Formats/PixelTypeInfo.cs
-
src/ImageSharp/Metadata/ImageMetadata.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; |
|
|
|
|
|
|
|
@ -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; |
|
|
|
|