diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Argb32.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Argb32.PixelOperations.cs
new file mode 100644
index 0000000000..f819329550
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Argb32.PixelOperations.cs
@@ -0,0 +1,22 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct Argb32
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgr24.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgr24.PixelOperations.cs
new file mode 100644
index 0000000000..cd77f58164
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgr24.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct Bgr24
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgra32.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgra32.PixelOperations.cs
new file mode 100644
index 0000000000..849f538351
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgra32.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct Bgra32
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgra5551.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgra5551.PixelOperations.cs
new file mode 100644
index 0000000000..4714a8be2a
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Bgra5551.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct Bgra5551
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.cs
index ce72eba818..9df708d44d 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
-
///
public override void FromArgb32(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.tt
index 1854bcd41c..bbee95f24c 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Argb32.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Argb32"); #>
<# GenerateAllDefaultConversionMethods("Argb32"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.cs
index 7b15a26119..a66a6e12c8 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
-
///
public override void FromBgr24(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.tt
index 01c9fde890..48b6daa3aa 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgr24.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Bgr24"); #>
<# GenerateAllDefaultConversionMethods("Bgr24"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.cs
index 8304ad2cae..77b665a4c7 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
-
///
public override void FromBgra32(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.tt
index 6066314312..7e15979890 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra32.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Bgra32"); #>
<# GenerateAllDefaultConversionMethods("Bgra32"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.cs
index 33b9556199..1d13722e42 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
-
///
public override void FromBgra5551(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.tt
index 3c18f47448..c74dfb4bd1 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Bgra5551.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Bgra5551"); #>
<# GenerateAllDefaultConversionMethods("Bgra5551"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.cs
index 88dc85f57b..03b84be5d7 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
-
///
public override void FromL16(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.tt
index 27b9770597..9c0f725e62 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L16.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("L16"); #>
<# GenerateAllDefaultConversionMethods("L16"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.cs
index 2b16851d6c..f52e77b1a3 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
-
///
public override void FromL8(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.tt
index c054d08470..e6d4a45efc 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/L8.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("L8"); #>
<# GenerateAllDefaultConversionMethods("L8"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.cs
index 7cc94ecae7..e01399b8af 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
-
///
public override void FromLa16(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.tt
index 06d2ec1abb..7b88fd4f1a 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La16.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("La16"); #>
<# GenerateAllDefaultConversionMethods("La16"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.cs
index ccee68190f..0aa2afef52 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
-
///
public override void FromLa32(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.tt
index 34f54e77a4..f85652cad9 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/La32.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("La32"); #>
<# GenerateAllDefaultConversionMethods("La32"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.cs
index 23b9824000..a9303f9d8a 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
-
///
public override void FromRgb24(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.tt
index e1d2878caf..056c2a2797 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb24.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Rgb24"); #>
<# GenerateAllDefaultConversionMethods("Rgb24"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.cs
index ce067906c1..30328366d8 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
-
///
public override void FromRgb48(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.tt
index 6d05b4851f..f46493e621 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgb48.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Rgb48"); #>
<# GenerateAllDefaultConversionMethods("Rgb48"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.cs
index 90b05f7865..c23198e760 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -23,9 +22,6 @@ namespace SixLabors.ImageSharp.PixelFormats
internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
-
///
public override void FromRgba32(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.tt
index d40af0f4d5..6a6cac4e36 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba32.PixelOperations.Generated.tt
@@ -12,7 +12,6 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Rgba32"); #>
<# GenerateAllDefaultConversionMethods("Rgba32"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.cs
index 2cd27e8e3e..129e9ff0b5 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.cs
@@ -7,7 +7,6 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -20,12 +19,9 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
-
///
public override void FromRgba64(Configuration configuration, ReadOnlySpan source, Span destinationPixels)
{
@@ -44,7 +40,6 @@ namespace SixLabors.ImageSharp.PixelFormats
sourcePixels.CopyTo(destinationPixels);
}
-
///
public override void ToArgb32(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.tt
index d0f4265f3c..cf02d38ee0 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/Rgba64.PixelOperations.Generated.tt
@@ -10,9 +10,8 @@ namespace SixLabors.ImageSharp.PixelFormats
///
/// Provides optimized overrides for bulk operations.
///
- internal class PixelOperations : PixelOperations
+ internal partial class PixelOperations : PixelOperations
{
- <# GeneratePixelTypeInfo("Rgba64"); #>
<# GenerateAllDefaultConversionMethods("Rgba64"); #>
}
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/_Common.ttinclude b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/_Common.ttinclude
index 7a29e46593..7c2eccedcc 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/_Common.ttinclude
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/_Common.ttinclude
@@ -12,31 +12,8 @@ using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
<#+
- private static readonly string[] UnassociatedAlphaPixelTypes =
- {
- "A8",
- "Argb32",
- "Bgra32",
- "Bgra4444",
- "Bgra5551",
- "Byte4",
- "HalfVector4",
- "La16",
- "La32",
- "NormalizedByte4",
- "NormalizedShort4",
- "Rgba1010102",
- "Rgba32",
- "Rgba64",
- "RgbaVector",
- "Short4"
- };
-
- private static readonly string[] AssociatedAlphaPixelTypes = Array.Empty();
-
private static readonly string[] CommonPixelTypes =
{
"Argb32",
@@ -71,23 +48,6 @@ using SixLabors.ImageSharp.PixelFormats.Utils;
"Bgr24"
};
- void GeneratePixelTypeInfo(string pixelType)
- {
- string alpha = "PixelAlphaRepresentation.None";
- if (AssociatedAlphaPixelTypes.Contains(pixelType))
- {
- alpha = "PixelAlphaRepresentation.Associated";
- }
- else if (UnassociatedAlphaPixelTypes.Contains(pixelType))
- {
- alpha = "PixelAlphaRepresentation.Unassociated";
- }
-#>
- ///
- public override PixelTypeInfo GetPixelTypeInfo() => PixelTypeInfo.Create<<#=pixelType#>>(<#=alpha#>);
-<#+
- }
-
void GenerateGenericConverterMethods(string pixelType)
{
#>
@@ -123,7 +83,6 @@ using SixLabors.ImageSharp.PixelFormats.Utils;
sourcePixels.CopyTo(destinationPixels);
}
-
<#+
}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/L16.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/L16.PixelOperations.cs
new file mode 100644
index 0000000000..62d0e6164b
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/L16.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct L16
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/L8.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/L8.PixelOperations.cs
new file mode 100644
index 0000000000..5da55ffb43
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/L8.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct L8
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/La16.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/La16.PixelOperations.cs
new file mode 100644
index 0000000000..feb4b65fd3
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/La16.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct La16
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/La32.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/La32.PixelOperations.cs
new file mode 100644
index 0000000000..f69e6c185d
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/La32.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct La32
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb24.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb24.PixelOperations.cs
new file mode 100644
index 0000000000..c4c6ac8ad0
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb24.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct Rgb24
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb48.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb48.PixelOperations.cs
new file mode 100644
index 0000000000..bbe12315f3
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgb48.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct Rgb48
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.None);
+ }
+ }
+}
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgba32.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgba32.PixelOperations.cs
index dcf304e9b0..bc44548590 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgba32.PixelOperations.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgba32.PixelOperations.cs
@@ -4,7 +4,7 @@
using System;
using System.Numerics;
using System.Runtime.InteropServices;
-
+using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats.Utils;
namespace SixLabors.ImageSharp.PixelFormats
@@ -19,6 +19,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal partial class PixelOperations : PixelOperations
{
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
+
///
public override void ToVector4(
Configuration configuration,
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgba64.PixelOperations.cs b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgba64.PixelOperations.cs
new file mode 100644
index 0000000000..e953a378e1
--- /dev/null
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Rgba64.PixelOperations.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Six Labors.
+// Licensed under the Apache License, Version 2.0.
+
+using SixLabors.ImageSharp.Formats;
+
+namespace SixLabors.ImageSharp.PixelFormats
+{
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ public partial struct Rgba64
+ {
+ ///
+ /// Provides optimized overrides for bulk operations.
+ ///
+ internal partial class PixelOperations : PixelOperations
+ {
+ ///
+ public override PixelTypeInfo GetPixelTypeInfo()
+ => PixelTypeInfo.Create(PixelAlphaRepresentation.Unassociated);
+ }
+ }
+}