From bede955d182dabce66df5e8bc2c4937ee5593167 Mon Sep 17 00:00:00 2001 From: mgood7123 Date: Fri, 1 Jul 2022 17:34:05 +1000 Subject: [PATCH 1/3] add /.idea to git ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 69ab121786..2ca4de1d89 100644 --- a/.gitignore +++ b/.gitignore @@ -309,3 +309,4 @@ Carthage/Build fastlane/report.xml fastlane/screenshots +/.idea From 65d07800a450b41756d49e977962f21b6bc7b9f8 Mon Sep 17 00:00:00 2001 From: mgood7123 Date: Sat, 9 Jul 2022 23:45:23 +1000 Subject: [PATCH 2/3] add more constructors --- binding/SkiaSharp/SKImageInfo.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/binding/SkiaSharp/SKImageInfo.cs b/binding/SkiaSharp/SKImageInfo.cs index 3a930c1183..9d8df510d6 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 = SKAlphaType.Premul; + 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 (); From 64bb6db5e0c77fd5ef5ea6a196baf7812a10d91f Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Fri, 9 Feb 2024 22:33:50 +0200 Subject: [PATCH 3/3] fix ctor --- .gitignore | 1 - binding/SkiaSharp/SKImageInfo.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2ca4de1d89..69ab121786 100644 --- a/.gitignore +++ b/.gitignore @@ -309,4 +309,3 @@ Carthage/Build fastlane/report.xml fastlane/screenshots -/.idea diff --git a/binding/SkiaSharp/SKImageInfo.cs b/binding/SkiaSharp/SKImageInfo.cs index 9d8df510d6..ec087a0a52 100644 --- a/binding/SkiaSharp/SKImageInfo.cs +++ b/binding/SkiaSharp/SKImageInfo.cs @@ -88,7 +88,7 @@ public SKImageInfo(int width, int height, SKAlphaType alphaType) Width = width; Height = height; ColorType = PlatformColorType; - AlphaType = SKAlphaType.Premul; + AlphaType = alphaType; ColorSpace = null; }