diff --git a/binding/SkiaSharp/SKImageInfo.cs b/binding/SkiaSharp/SKImageInfo.cs index 3a930c1183..ec087a0a52 100644 --- a/binding/SkiaSharp/SKImageInfo.cs +++ b/binding/SkiaSharp/SKImageInfo.cs @@ -83,6 +83,15 @@ public SKImageInfo (int width, int height, SKColorType colorType) ColorSpace = null; } + public SKImageInfo(int width, int height, SKAlphaType alphaType) + { + Width = width; + Height = height; + ColorType = PlatformColorType; + AlphaType = alphaType; + ColorSpace = null; + } + public SKImageInfo (int width, int height, SKColorType colorType, SKAlphaType alphaType) { Width = width; @@ -101,6 +110,15 @@ public SKImageInfo (int width, int height, SKColorType colorType, SKAlphaType al ColorSpace = colorspace; } + public SKImageInfo(int width, int height, SKAlphaType alphaType, SKColorSpace colorspace) + { + Width = width; + Height = height; + ColorType = PlatformColorType; + AlphaType = alphaType; + ColorSpace = colorspace; + } + public readonly int BytesPerPixel => ColorType.GetBytesPerPixel ();