diff --git a/src/ImageSharp.ruleset b/src/ImageSharp.ruleset index d7a147df0..856838ade 100644 --- a/src/ImageSharp.ruleset +++ b/src/ImageSharp.ruleset @@ -1,6 +1,9 @@  + + + diff --git a/src/ImageSharp/Formats/PixelTypeInfo.cs b/src/ImageSharp/Formats/PixelTypeInfo.cs index 15fd0dc2a..ba26e48ee 100644 --- a/src/ImageSharp/Formats/PixelTypeInfo.cs +++ b/src/ImageSharp/Formats/PixelTypeInfo.cs @@ -15,7 +15,7 @@ namespace SixLabors.ImageSharp.Formats; public readonly struct PixelTypeInfo { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the struct. /// /// Color depth, in number of bits per pixel. public PixelTypeInfo(int bitsPerPixel) @@ -26,6 +26,9 @@ public readonly struct PixelTypeInfo /// public int BitsPerPixel { get; init; } + /// + /// Gets the count of the color components + /// public byte ComponentCount { get; init; } /// diff --git a/src/ImageSharp/PixelFormats/IPixel.cs b/src/ImageSharp/PixelFormats/IPixel.cs index cddf6453d..ed02bc917 100644 --- a/src/ImageSharp/PixelFormats/IPixel.cs +++ b/src/ImageSharp/PixelFormats/IPixel.cs @@ -15,6 +15,10 @@ namespace SixLabors.ImageSharp.PixelFormats; public interface IPixel : IPixel, IEquatable where TSelf : unmanaged, IPixel { + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo static abstract PixelTypeInfo GetPixelTypeInfo(); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/A8.cs b/src/ImageSharp/PixelFormats/PixelImplementations/A8.cs index b2d99ac4b..8a641da4b 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/A8.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/A8.cs @@ -56,6 +56,10 @@ public partial struct A8 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(A8 left, A8 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(1, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Abgr32.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Abgr32.cs index 7c0dba552..692258add 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Abgr32.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Abgr32.cs @@ -184,6 +184,10 @@ public partial struct Abgr32 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Abgr32 left, Abgr32 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Argb32.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Argb32.cs index f09f25ab0..1ed505ce0 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Argb32.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Argb32.cs @@ -184,6 +184,10 @@ public partial struct Argb32 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Argb32 left, Argb32 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Bgr24.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Bgr24.cs index 499c72b8d..16f3a3aa3 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Bgr24.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Bgr24.cs @@ -88,6 +88,10 @@ public partial struct Bgr24 : IPixel [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Bgr24 left, Bgr24 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(3, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Bgr565.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Bgr565.cs index 1ac9fbddb..76ba91d26 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Bgr565.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Bgr565.cs @@ -60,6 +60,10 @@ public partial struct Bgr565 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Bgr565 left, Bgr565 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(3, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Bgra32.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Bgra32.cs index a689067e5..33b5cbdf8 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Bgra32.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Bgra32.cs @@ -137,6 +137,10 @@ public partial struct Bgra32 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Bgra32 left, Bgra32 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Bgra4444.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Bgra4444.cs index de94817d4..551f9ae8b 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Bgra4444.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Bgra4444.cs @@ -58,6 +58,10 @@ public partial struct Bgra4444 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Bgra4444 left, Bgra4444 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Bgra5551.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Bgra5551.cs index 2bfbde7c6..2477fd017 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Bgra5551.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Bgra5551.cs @@ -61,6 +61,10 @@ public partial struct Bgra5551 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Bgra5551 left, Bgra5551 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Byte4.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Byte4.cs index e1d6bdd52..de35a345e 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Byte4.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Byte4.cs @@ -61,6 +61,10 @@ public partial struct Byte4 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Byte4 left, Byte4 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/HalfSingle.cs b/src/ImageSharp/PixelFormats/PixelImplementations/HalfSingle.cs index b37b7260c..f1a8c175c 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/HalfSingle.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/HalfSingle.cs @@ -46,6 +46,10 @@ public partial struct HalfSingle : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(HalfSingle left, HalfSingle right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(1, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector2.cs b/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector2.cs index 02c3433fd..5a0bdb437 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector2.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector2.cs @@ -53,6 +53,10 @@ public partial struct HalfVector2 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(HalfVector2 left, HalfVector2 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(2, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector4.cs b/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector4.cs index ee8be97c1..0f4059461 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector4.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/HalfVector4.cs @@ -58,6 +58,10 @@ public partial struct HalfVector4 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(HalfVector4 left, HalfVector4 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/L16.cs b/src/ImageSharp/PixelFormats/PixelImplementations/L16.cs index 2b70c1563..f9ec88f8e 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/L16.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/L16.cs @@ -48,6 +48,10 @@ public partial struct L16 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(L16 left, L16 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(1, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/L8.cs b/src/ImageSharp/PixelFormats/PixelImplementations/L8.cs index df6189706..5b3b8934b 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/L8.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/L8.cs @@ -49,6 +49,10 @@ public partial struct L8 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(L8 left, L8 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(1, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/La16.cs b/src/ImageSharp/PixelFormats/PixelImplementations/La16.cs index 97e5db9f0..5d72818ac 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/La16.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/La16.cs @@ -72,6 +72,10 @@ public partial struct La16 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(La16 left, La16 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(2, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/La32.cs b/src/ImageSharp/PixelFormats/PixelImplementations/La32.cs index 090824a83..1cf04d157 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/La32.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/La32.cs @@ -74,6 +74,10 @@ public partial struct La32 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(La32 left, La32 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(2, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte2.cs b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte2.cs index ba56e9ecd..f843d2781 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte2.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte2.cs @@ -61,6 +61,10 @@ public partial struct NormalizedByte2 : IPixel, IPackedVector !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(2, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte4.cs b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte4.cs index 27fed194f..a3266437d 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte4.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedByte4.cs @@ -63,6 +63,10 @@ public partial struct NormalizedByte4 : IPixel, IPackedVector !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort2.cs b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort2.cs index 55ab0888b..2049acf3f 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort2.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort2.cs @@ -62,6 +62,10 @@ public partial struct NormalizedShort2 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(NormalizedShort2 left, NormalizedShort2 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(2, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort4.cs b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort4.cs index 0306a6329..b80ad0a74 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort4.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/NormalizedShort4.cs @@ -64,6 +64,10 @@ public partial struct NormalizedShort4 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(NormalizedShort4 left, NormalizedShort4 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb24.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb24.PixelOperations.cs index f88640d9e..b4dd4fcc3 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb24.PixelOperations.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb24.PixelOperations.cs @@ -15,7 +15,6 @@ public partial struct Rgb24 /// internal partial class PixelOperations : PixelOperations { - /// internal override void PackFromRgbPlanes( ReadOnlySpan redChannel, diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Rg32.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Rg32.cs index b824acad4..074acf911 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Rg32.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Rg32.cs @@ -58,6 +58,10 @@ public partial struct Rg32 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Rg32 left, Rg32 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(2, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs index 609ad21b7..f4350c786 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs @@ -107,6 +107,10 @@ public partial struct Rgb24 : IPixel [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Rgb24 left, Rgb24 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(3, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Rgb48.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Rgb48.cs index e89393c52..64cbfc046 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Rgb48.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Rgb48.cs @@ -70,6 +70,10 @@ public partial struct Rgb48 : IPixel [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Rgb48 left, Rgb48 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(3, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Rgba1010102.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Rgba1010102.cs index 734b1e229..305144863 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Rgba1010102.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Rgba1010102.cs @@ -61,6 +61,10 @@ public partial struct Rgba1010102 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Rgba1010102 left, Rgba1010102 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Rgba32.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Rgba32.cs index e1be7d0ec..a6267d771 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Rgba32.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Rgba32.cs @@ -287,6 +287,10 @@ public partial struct Rgba32 : IPixel, IPackedVector return true; } + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Rgba64.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Rgba64.cs index 95b1f242f..e564b26f7 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Rgba64.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Rgba64.cs @@ -207,6 +207,10 @@ public partial struct Rgba64 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Rgba64 left, Rgba64 right) => left.PackedValue != right.PackedValue; + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.cs b/src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.cs index c914ca9e3..41f564861 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.cs @@ -97,6 +97,10 @@ public partial struct RgbaVector : IPixel /// public static RgbaVector FromHex(string hex) => Color.ParseHex(hex).ToPixel(); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Short2.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Short2.cs index b5155c1fa..015d334bd 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Short2.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Short2.cs @@ -65,6 +65,10 @@ public partial struct Short2 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Short2 left, Short2 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(2, PixelAlphaRepresentation.None); /// diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Short4.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Short4.cs index 331888999..2c85a8d77 100644 --- a/src/ImageSharp/PixelFormats/PixelImplementations/Short4.cs +++ b/src/ImageSharp/PixelFormats/PixelImplementations/Short4.cs @@ -67,6 +67,10 @@ public partial struct Short4 : IPixel, IPackedVector [MethodImpl(InliningOptions.ShortMethod)] public static bool operator !=(Short4 left, Short4 right) => !left.Equals(right); + /// + /// Gets the The pixel type information. + /// + /// PixelTypeInfo public static PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(4, PixelAlphaRepresentation.Unassociated); ///