From 92f47fc628a44e11a2553ead6304cded078711e9 Mon Sep 17 00:00:00 2001 From: jz5 Date: Mon, 10 Jan 2022 22:55:19 +0900 Subject: [PATCH] Update the PixelTypeInfo constructor to use separate overloads with and without the PixelAlphaRepresentation (not nullable) parameter. --- src/ImageSharp/Formats/PixelTypeInfo.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/PixelTypeInfo.cs b/src/ImageSharp/Formats/PixelTypeInfo.cs index 1bc717cbbd..afa3b19a22 100644 --- a/src/ImageSharp/Formats/PixelTypeInfo.cs +++ b/src/ImageSharp/Formats/PixelTypeInfo.cs @@ -15,8 +15,17 @@ namespace SixLabors.ImageSharp.Formats /// Initializes a new instance of the class. /// /// Color depth, in number of bits per pixel. - /// Tthe pixel alpha transparency behavior. - public PixelTypeInfo(int bitsPerPixel, PixelAlphaRepresentation? alpha = null) + public PixelTypeInfo(int bitsPerPixel) + { + this.BitsPerPixel = bitsPerPixel; + } + + /// + /// Initializes a new instance of the class. + /// + /// Color depth, in number of bits per pixel. + /// The pixel alpha transparency behavior. + public PixelTypeInfo(int bitsPerPixel, PixelAlphaRepresentation alpha) { this.BitsPerPixel = bitsPerPixel; this.AlphaRepresentation = alpha;