From 1782c8341502443b458beda1dd109f4965dcecae Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Tue, 5 Sep 2023 20:11:39 +0200 Subject: [PATCH] Small fixes --- ScreenCapture.NET/Model/Colors/ColorBGRA.cs | 2 -- ScreenCapture.NET/Model/Image.cs | 12 ++++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ScreenCapture.NET/Model/Colors/ColorBGRA.cs b/ScreenCapture.NET/Model/Colors/ColorBGRA.cs index dabd01c..1742899 100644 --- a/ScreenCapture.NET/Model/Colors/ColorBGRA.cs +++ b/ScreenCapture.NET/Model/Colors/ColorBGRA.cs @@ -9,9 +9,7 @@ public readonly struct ColorBGRA : IColor { #region Properties & Fields -#if NET7_0_OR_GREATER public static ColorFormat ColorFormat => ColorFormat.BGRA; -#endif private readonly byte _b; private readonly byte _g; diff --git a/ScreenCapture.NET/Model/Image.cs b/ScreenCapture.NET/Model/Image.cs index 6eae374..a67ba53 100644 --- a/ScreenCapture.NET/Model/Image.cs +++ b/ScreenCapture.NET/Model/Image.cs @@ -44,8 +44,16 @@ public readonly ref struct Image } } - public ImageRows Rows => new(_pixels, _x, _y, Width, Height, _stride); - public ImageColumns Columns => new(_pixels, _x, _y, Width, Height, _stride); + public ImageRows Rows + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => new(_pixels, _x, _y, Width, Height, _stride); + } + public ImageColumns Columns + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => new(_pixels, _x, _y, Width, Height, _stride); + } #endregion