diff --git a/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.cs b/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.cs
index e8908fe05..3ea4007d2 100644
--- a/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.cs
+++ b/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.cs
@@ -1,4 +1,13 @@
-// Copyright (c) Six Labors and contributors.
+
+
+
+
+
+
+
+
+
+// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
//
@@ -10,8 +19,7 @@ namespace SixLabors.ImageSharp.PixelFormats
public partial class PixelOperations
{
-
- ///
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -19,7 +27,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// The number of pixels to convert.
internal virtual void PackFromRgba64(ReadOnlySpan source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Rgba64 sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -34,8 +42,8 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.PackFromRgba64(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -47,8 +55,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromRgba64(MemoryMarshal.Cast(sourceBytes), destPixels, count);
}
-
- ///
+
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -70,20 +78,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToRgba64Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.ToRgba64(sourceColors, MemoryMarshal.Cast(destBytes), count);
}
-
- ///
+
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -91,7 +99,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// The number of pixels to convert.
internal virtual void PackFromRgb48(ReadOnlySpan source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -106,8 +114,8 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.PackFromRgb48(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -119,8 +127,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromRgb48(MemoryMarshal.Cast(sourceBytes), destPixels, count);
}
-
- ///
+
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -142,20 +150,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToRgb48Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.ToRgb48(sourceColors, MemoryMarshal.Cast(destBytes), count);
}
-
- ///
+
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -163,7 +171,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// The number of pixels to convert.
internal virtual void PackFromRgba32(ReadOnlySpan source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Rgba32 sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -178,8 +186,8 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.PackFromRgba32(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -191,8 +199,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromRgba32(MemoryMarshal.Cast(sourceBytes), destPixels, count);
}
-
- ///
+
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -214,20 +222,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToRgba32Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.ToRgba32(sourceColors, MemoryMarshal.Cast(destBytes), count);
}
-
- ///
+
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -235,7 +243,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// The number of pixels to convert.
internal virtual void PackFromBgra32(ReadOnlySpan source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Bgra32 sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -250,8 +258,8 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.PackFromBgra32(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -263,8 +271,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromBgra32(MemoryMarshal.Cast(sourceBytes), destPixels, count);
}
-
- ///
+
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -286,20 +294,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToBgra32Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.ToBgra32(sourceColors, MemoryMarshal.Cast(destBytes), count);
}
-
- ///
+
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -307,7 +315,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// The number of pixels to convert.
internal virtual void PackFromRgb24(ReadOnlySpan source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -322,8 +330,8 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.PackFromRgba32(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -335,8 +343,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromRgb24(MemoryMarshal.Cast(sourceBytes), destPixels, count);
}
-
- ///
+
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -358,20 +366,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToRgb24Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.ToRgb24(sourceColors, MemoryMarshal.Cast(destBytes), count);
}
-
- ///
+
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -379,7 +387,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// The number of pixels to convert.
internal virtual void PackFromBgr24(ReadOnlySpan source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -394,8 +402,8 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.PackFromRgba32(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -407,8 +415,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromBgr24(MemoryMarshal.Cast(sourceBytes), destPixels, count);
}
-
- ///
+
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -430,20 +438,20 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToBgr24Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.ToBgr24(sourceColors, MemoryMarshal.Cast(destBytes), count);
}
-
- ///
+
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -451,7 +459,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// The number of pixels to convert.
internal virtual void PackFromArgb32(ReadOnlySpan source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref Argb32 sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -466,8 +474,8 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.PackFromArgb32(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -479,8 +487,8 @@ namespace SixLabors.ImageSharp.PixelFormats
{
this.PackFromArgb32(MemoryMarshal.Cast(sourceBytes), destPixels, count);
}
-
- ///
+
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -502,19 +510,17 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void ToArgb32Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.ToArgb32(sourceColors, MemoryMarshal.Cast(destBytes), count);
}
-
- }
-
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.tt b/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.tt
index 5c762c7df..dbd30560e 100644
--- a/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.tt
+++ b/src/ImageSharp/PixelFormats/Generated/PixelOperations{TPixel}.Generated.tt
@@ -14,8 +14,7 @@
void GeneratePackFromMethods(string pixelType, string tempPixelType, string assignToTempCode)
{
#>
-
- ///
+ ///
/// Converts 'count' elements in 'source` span of data to a span of -s.
///
/// The source of data.
@@ -23,7 +22,7 @@
/// The number of pixels to convert.
internal virtual void PackFrom<#=pixelType#>(ReadOnlySpan<<#=pixelType#>> source, Span destPixels, int count)
{
- GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
+ GuardSpans(source, nameof(source), destPixels, nameof(destPixels), count);
ref <#=pixelType#> sourceRef = ref MemoryMarshal.GetReference(source);
ref TPixel destRef = ref MemoryMarshal.GetReference(destPixels);
@@ -38,8 +37,8 @@
dp.PackFrom<#=tempPixelType#>(temp);
}
}
-
- ///
+
+ ///
/// A helper for that expects a byte span.
/// The layout of the data in 'sourceBytes' must be compatible with layout.
///
@@ -51,14 +50,13 @@
{
this.PackFrom<#=pixelType#>(MemoryMarshal.Cast>(sourceBytes), destPixels, count);
}
- <#
+<#
}
void GenerateToDestFormatMethods(string pixelType)
{
#>
-
- ///
+ ///
/// Converts 'count' pixels in 'sourcePixels` span to a span of -s.
/// Bulk version of .
///
@@ -80,19 +78,19 @@
}
}
- ///
+ ///
/// A helper for that expects a byte span as destination.
/// The layout of the data in 'destBytes' must be compatible with layout.
///
/// The to the source colors.
/// The to the destination bytes.
/// The number of pixels to convert.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void To<#=pixelType#>Bytes(ReadOnlySpan sourceColors, Span destBytes, int count)
{
this.To<#=pixelType#>(sourceColors, MemoryMarshal.Cast>(destBytes), count);
}
- <#
+<#
}
#>
@@ -107,8 +105,8 @@ namespace SixLabors.ImageSharp.PixelFormats
using System.Runtime.InteropServices;
public partial class PixelOperations
- {
- <#
+ {<#
+
GeneratePackFromMethods("Rgba64", "Rgba64", "temp = Unsafe.Add(ref sourceRef, i);");
GenerateToDestFormatMethods("Rgba64");
@@ -129,8 +127,5 @@ namespace SixLabors.ImageSharp.PixelFormats
GeneratePackFromMethods("Argb32", "Argb32", "temp = Unsafe.Add(ref sourceRef, i);");
GenerateToDestFormatMethods("Argb32");
- #>
-
- }
-
+ #> }
}
\ No newline at end of file