From d1c231bb85876ed40d569a5f29497fb5e68c5cda Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Tue, 12 Dec 2023 08:08:51 +1000 Subject: [PATCH] Rename property, use int. --- src/ImageSharp/Color/Color.cs | 2 +- src/ImageSharp/Formats/PixelTypeInfo.cs | 8 ++++---- src/ImageSharp/PixelFormats/PixelComponentPrecision.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/A8Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Abgr32Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Argb32Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Bgr24Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Bgr565Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Bgra32Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Bgra4444Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Bgra5551Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Byte4Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/HalfSingleTests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/HalfVector2Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/HalfVector4Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/L16Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/L8Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/La16Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/La32Tests.cs | 2 +- .../ImageSharp.Tests/PixelFormats/NormalizedByte2Tests.cs | 2 +- .../ImageSharp.Tests/PixelFormats/NormalizedByte4Tests.cs | 2 +- .../PixelFormats/NormalizedShort2Tests.cs | 2 +- .../PixelFormats/NormalizedShort4Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Rg32Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Rgb24Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Rgb48Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Rgba1010102Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Rgba64Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Short2Tests.cs | 2 +- tests/ImageSharp.Tests/PixelFormats/Short4Tests.cs | 2 +- 32 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/ImageSharp/Color/Color.cs b/src/ImageSharp/Color/Color.cs index 3af3e04f07..7110090501 100644 --- a/src/ImageSharp/Color/Color.cs +++ b/src/ImageSharp/Color/Color.cs @@ -127,7 +127,7 @@ public readonly partial struct Color : IEquatable } PixelTypeInfo info = TPixel.GetPixelTypeInfo(); - if (info.ComponentPrecision <= PixelComponentPrecision.Byte) + if (info.MaxComponentPrecision <= PixelComponentPrecision.Byte) { Rgba32 p = default; pixel.ToRgba32(ref p); diff --git a/src/ImageSharp/Formats/PixelTypeInfo.cs b/src/ImageSharp/Formats/PixelTypeInfo.cs index 0c2a4f4c86..170ffcfae6 100644 --- a/src/ImageSharp/Formats/PixelTypeInfo.cs +++ b/src/ImageSharp/Formats/PixelTypeInfo.cs @@ -26,12 +26,12 @@ public readonly struct PixelTypeInfo(int bitsPerPixel) /// /// Gets the count of the color components /// - public byte ComponentCount { get; init; } + public int ComponentCount { get; init; } /// - /// Gets the pixel component precision. + /// Gets the maximum precision of components within the pixel. /// - public PixelComponentPrecision? ComponentPrecision { get; init; } + public PixelComponentPrecision? MaxComponentPrecision { get; init; } /// /// Gets the pixel alpha transparency behavior. @@ -48,7 +48,7 @@ public readonly struct PixelTypeInfo(int bitsPerPixel) { BitsPerPixel = Unsafe.SizeOf() * 8, ComponentCount = componentCount, - ComponentPrecision = componentPrecision, + MaxComponentPrecision = componentPrecision, AlphaRepresentation = pixelAlphaRepresentation }; } diff --git a/src/ImageSharp/PixelFormats/PixelComponentPrecision.cs b/src/ImageSharp/PixelFormats/PixelComponentPrecision.cs index 8b12986578..3480ac76ed 100644 --- a/src/ImageSharp/PixelFormats/PixelComponentPrecision.cs +++ b/src/ImageSharp/PixelFormats/PixelComponentPrecision.cs @@ -4,7 +4,7 @@ namespace SixLabors.ImageSharp.PixelFormats; /// -/// Provides enumeration of the maximum precision of individual components within a pixel format. +/// Provides enumeration of the precision of individual components within a pixel format. /// public enum PixelComponentPrecision { diff --git a/tests/ImageSharp.Tests/PixelFormats/A8Tests.cs b/tests/ImageSharp.Tests/PixelFormats/A8Tests.cs index 008bc652c2..518aa203d9 100644 --- a/tests/ImageSharp.Tests/PixelFormats/A8Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/A8Tests.cs @@ -118,6 +118,6 @@ public class A8Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(1, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Abgr32Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Abgr32Tests.cs index 3c185383c3..dbe02e9868 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Abgr32Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Abgr32Tests.cs @@ -153,6 +153,6 @@ public class Abgr32Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Argb32Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Argb32Tests.cs index f6b818fb58..fd8ee144ba 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Argb32Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Argb32Tests.cs @@ -151,6 +151,6 @@ public class Argb32Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Bgr24Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Bgr24Tests.cs index 6861dab41c..78c58e5c26 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Bgr24Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Bgr24Tests.cs @@ -136,6 +136,6 @@ public class Bgr24Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(3, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Bgr565Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Bgr565Tests.cs index b68b943251..68f9532252 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Bgr565Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Bgr565Tests.cs @@ -258,6 +258,6 @@ public class Bgr565Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(3, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Bgra32Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Bgra32Tests.cs index 17d184d1a5..e92fcf1d36 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Bgra32Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Bgra32Tests.cs @@ -153,6 +153,6 @@ public class Bgra32Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Bgra4444Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Bgra4444Tests.cs index 648ef79d5a..1af84c0c84 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Bgra4444Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Bgra4444Tests.cs @@ -254,6 +254,6 @@ public class Bgra4444Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Bgra5551Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Bgra5551Tests.cs index e32ec665e2..a0926d4ddf 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Bgra5551Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Bgra5551Tests.cs @@ -280,6 +280,6 @@ public class Bgra5551Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Byte4Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Byte4Tests.cs index ce5752fbad..5b456459ea 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Byte4Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Byte4Tests.cs @@ -247,6 +247,6 @@ public class Byte4Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/HalfSingleTests.cs b/tests/ImageSharp.Tests/PixelFormats/HalfSingleTests.cs index cbff2b85e9..9c546e2f0c 100644 --- a/tests/ImageSharp.Tests/PixelFormats/HalfSingleTests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/HalfSingleTests.cs @@ -76,6 +76,6 @@ public class HalfSingleTests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(1, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Half, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Half, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/HalfVector2Tests.cs b/tests/ImageSharp.Tests/PixelFormats/HalfVector2Tests.cs index 98a5cb0bff..4f84d60871 100644 --- a/tests/ImageSharp.Tests/PixelFormats/HalfVector2Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/HalfVector2Tests.cs @@ -98,6 +98,6 @@ public class HalfVector2Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(2, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Half, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Half, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/HalfVector4Tests.cs b/tests/ImageSharp.Tests/PixelFormats/HalfVector4Tests.cs index 48d10f1c1e..33f0173d2e 100644 --- a/tests/ImageSharp.Tests/PixelFormats/HalfVector4Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/HalfVector4Tests.cs @@ -89,6 +89,6 @@ public class HalfVector4Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Half, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Half, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/L16Tests.cs b/tests/ImageSharp.Tests/PixelFormats/L16Tests.cs index 18481712a0..0c0cdbe3bf 100644 --- a/tests/ImageSharp.Tests/PixelFormats/L16Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/L16Tests.cs @@ -168,6 +168,6 @@ public class L16Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(1, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.UShort, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.UShort, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/L8Tests.cs b/tests/ImageSharp.Tests/PixelFormats/L8Tests.cs index 80dc36fa39..d8bce0640e 100644 --- a/tests/ImageSharp.Tests/PixelFormats/L8Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/L8Tests.cs @@ -263,7 +263,7 @@ public class L8Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(1, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } } diff --git a/tests/ImageSharp.Tests/PixelFormats/La16Tests.cs b/tests/ImageSharp.Tests/PixelFormats/La16Tests.cs index c3d8a873ac..46e7457a5f 100644 --- a/tests/ImageSharp.Tests/PixelFormats/La16Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/La16Tests.cs @@ -267,7 +267,7 @@ public class La16Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(2, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } } diff --git a/tests/ImageSharp.Tests/PixelFormats/La32Tests.cs b/tests/ImageSharp.Tests/PixelFormats/La32Tests.cs index 17e10e15d8..65aa8b1c9c 100644 --- a/tests/ImageSharp.Tests/PixelFormats/La32Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/La32Tests.cs @@ -174,6 +174,6 @@ public class La32Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(2, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.UShort, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.UShort, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/NormalizedByte2Tests.cs b/tests/ImageSharp.Tests/PixelFormats/NormalizedByte2Tests.cs index a09454f5bc..999ddb9341 100644 --- a/tests/ImageSharp.Tests/PixelFormats/NormalizedByte2Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/NormalizedByte2Tests.cs @@ -90,6 +90,6 @@ public class NormalizedByte2Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(2, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.SByte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.SByte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/NormalizedByte4Tests.cs b/tests/ImageSharp.Tests/PixelFormats/NormalizedByte4Tests.cs index aa0136b37d..64a996453b 100644 --- a/tests/ImageSharp.Tests/PixelFormats/NormalizedByte4Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/NormalizedByte4Tests.cs @@ -240,6 +240,6 @@ public class NormalizedByte4Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.SByte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.SByte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/NormalizedShort2Tests.cs b/tests/ImageSharp.Tests/PixelFormats/NormalizedShort2Tests.cs index 6ac18fa089..e6d4ae98d9 100644 --- a/tests/ImageSharp.Tests/PixelFormats/NormalizedShort2Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/NormalizedShort2Tests.cs @@ -94,6 +94,6 @@ public class NormalizedShort2Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(2, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Short, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Short, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/NormalizedShort4Tests.cs b/tests/ImageSharp.Tests/PixelFormats/NormalizedShort4Tests.cs index fcab7318b6..cd684311a9 100644 --- a/tests/ImageSharp.Tests/PixelFormats/NormalizedShort4Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/NormalizedShort4Tests.cs @@ -241,6 +241,6 @@ public class NormalizedShort4Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Short, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Short, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Rg32Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Rg32Tests.cs index c5c534655a..bf3ff6416a 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Rg32Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Rg32Tests.cs @@ -92,6 +92,6 @@ public class Rg32Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(2, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.UShort, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.UShort, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Rgb24Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Rgb24Tests.cs index dbb2e8f03d..c69c757b59 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Rgb24Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Rgb24Tests.cs @@ -139,6 +139,6 @@ public class Rgb24Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(3, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Rgb48Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Rgb48Tests.cs index 04bbaf7f78..dda5af9fb3 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Rgb48Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Rgb48Tests.cs @@ -84,6 +84,6 @@ public class Rgb48Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(3, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.UShort, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.UShort, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Rgba1010102Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Rgba1010102Tests.cs index 678ac2274e..5b0e4c2874 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Rgba1010102Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Rgba1010102Tests.cs @@ -255,6 +255,6 @@ public class Rgba1010102Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.UShort, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.UShort, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs index 6154773e85..d1ad4c304a 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Rgba32Tests.cs @@ -315,6 +315,6 @@ public class Rgba32Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Byte, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Byte, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Rgba64Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Rgba64Tests.cs index e9b61c1e3a..3dc5804604 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Rgba64Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Rgba64Tests.cs @@ -317,6 +317,6 @@ public class Rgba64Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.UShort, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.UShort, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs b/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs index ba30b0bfe8..968e274e23 100644 --- a/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/RgbaVectorTests.cs @@ -213,6 +213,6 @@ public class RgbaVectorTests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Float, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Float, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Short2Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Short2Tests.cs index 27631cbc78..7afe61b025 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Short2Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Short2Tests.cs @@ -169,6 +169,6 @@ public class Short2Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(2, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.None, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Short, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Short, info.MaxComponentPrecision); } } diff --git a/tests/ImageSharp.Tests/PixelFormats/Short4Tests.cs b/tests/ImageSharp.Tests/PixelFormats/Short4Tests.cs index 8d853f0593..bdde5cd8f9 100644 --- a/tests/ImageSharp.Tests/PixelFormats/Short4Tests.cs +++ b/tests/ImageSharp.Tests/PixelFormats/Short4Tests.cs @@ -222,6 +222,6 @@ public class Short4Tests Assert.Equal(Unsafe.SizeOf() * 8, info.BitsPerPixel); Assert.Equal(4, info.ComponentCount); Assert.Equal(PixelAlphaRepresentation.Unassociated, info.AlphaRepresentation); - Assert.Equal(PixelComponentPrecision.Short, info.ComponentPrecision); + Assert.Equal(PixelComponentPrecision.Short, info.MaxComponentPrecision); } }