diff --git a/src/ImageSharp.Drawing/Processing/SolidBrush{TPixel}.cs b/src/ImageSharp.Drawing/Processing/SolidBrush{TPixel}.cs
index a77c6728b5..6a80287706 100644
--- a/src/ImageSharp.Drawing/Processing/SolidBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Processing/SolidBrush{TPixel}.cs
@@ -89,7 +89,17 @@ namespace SixLabors.ImageSharp.Processing
///
internal override void Apply(Span scanline, int x, int y)
{
- Span destinationRow = this.Target.GetPixelRowSpan(y).Slice(x, scanline.Length);
+ Span destinationRow = this.Target.GetPixelRowSpan(y).Slice(x);
+
+ // constrain the spans to eachother
+ if (destinationRow.Length > scanline.Length)
+ {
+ destinationRow = destinationRow.Slice(0, scanline.Length);
+ }
+ else
+ {
+ scanline = scanline.Slice(0, destinationRow.Length);
+ }
MemoryAllocator memoryAllocator = this.Target.MemoryAllocator;
Configuration configuration = this.Target.Configuration;
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.cs
index 6449351cca..2ec965dfb0 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromArgb32(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,41 +35,40 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
-
- ///
- internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
- }
+ ///
+ internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
+ }
- ///
- internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
- }
+ ///
+ internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
+ }
- ///
- internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
- }
+ ///
+ internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
+ }
- ///
- internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
- }
+ ///
+ internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
+ }
- ///
- internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
+ ///
+ internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
@@ -83,12 +81,12 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
internal override void FromRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
-
+
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
ref uint destRef = ref Unsafe.As(ref MemoryMarshal.GetReference(destPixels));
@@ -98,10 +96,10 @@ namespace SixLabors.ImageSharp.PixelFormats
Unsafe.Add(ref destRef, i) = PixelConverter.FromRgba32.ToArgb32(sp);
}
}
- ///
- internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
+ ///
+ internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
@@ -114,12 +112,12 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
internal override void FromBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
-
+
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
ref uint destRef = ref Unsafe.As(ref MemoryMarshal.GetReference(destPixels));
@@ -129,11 +127,11 @@ namespace SixLabors.ImageSharp.PixelFormats
Unsafe.Add(ref destRef, i) = PixelConverter.FromBgra32.ToArgb32(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgr24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -147,11 +145,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromArgb32(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray8(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -165,11 +163,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromArgb32(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray16(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -183,11 +181,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromArgb32(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -201,11 +199,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromArgb32(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb48(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -219,11 +217,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromArgb32(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba64(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Argb32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -237,7 +235,6 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromArgb32(sp);
}
}
-
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.tt
index 8c4c6b58af..0a58504e15 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Argb32.PixelOperations.Generated.tt
@@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
- <#
- GenerateAllDefaultConversionMethods("Argb32");
- #>
-
- }
- }
+ <# GenerateAllDefaultConversionMethods("Argb32"); #>
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.cs
index 9232cf4549..711a9d1c16 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromBgr24(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,42 +35,41 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToBgr24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
-
- ///
- internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
- }
-
- ///
- internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
- }
-
- ///
- internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
- }
-
- ///
- internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
- }
-
-
- ///
+ ///
+ internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
+ }
+
+ ///
+ internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
+ }
+
+ ///
+ internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
+ }
+
+ ///
+ internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
+ }
+
+
+ ///
internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -85,11 +83,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -103,11 +101,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray8(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -121,11 +119,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray16(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -139,11 +137,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -157,11 +155,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -175,11 +173,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb48(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -193,11 +191,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba64(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgr24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -211,7 +209,6 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgr24(sp);
}
}
-
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.tt
index 56e3bf9ba4..84b89aa32c 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgr24.PixelOperations.Generated.tt
@@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
- <#
- GenerateAllDefaultConversionMethods("Bgr24");
- #>
-
- }
- }
+ <# GenerateAllDefaultConversionMethods("Bgr24"); #>
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.cs
index 4f56b75c5a..b669dd5348 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromBgra32(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,41 +35,40 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
-
- ///
- internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
- }
+ ///
+ internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
+ }
- ///
- internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
- }
+ ///
+ internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
+ }
- ///
- internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
- }
+ ///
+ internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
+ }
- ///
- internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
- }
+ ///
+ internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
+ }
- ///
- internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
+ ///
+ internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
@@ -83,12 +81,12 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
internal override void FromRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
-
+
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
ref uint destRef = ref Unsafe.As(ref MemoryMarshal.GetReference(destPixels));
@@ -98,10 +96,10 @@ namespace SixLabors.ImageSharp.PixelFormats
Unsafe.Add(ref destRef, i) = PixelConverter.FromRgba32.ToBgra32(sp);
}
}
- ///
- internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
+ ///
+ internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
@@ -114,12 +112,12 @@ namespace SixLabors.ImageSharp.PixelFormats
}
}
- ///
+ ///
internal override void FromArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
-
+
ref uint sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(sourcePixels));
ref uint destRef = ref Unsafe.As(ref MemoryMarshal.GetReference(destPixels));
@@ -129,11 +127,11 @@ namespace SixLabors.ImageSharp.PixelFormats
Unsafe.Add(ref destRef, i) = PixelConverter.FromArgb32.ToBgra32(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgr24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgra32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -147,11 +145,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgra32(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray8(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgra32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -165,11 +163,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgra32(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray16(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgra32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -183,11 +181,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgra32(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgra32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -201,11 +199,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgra32(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb48(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgra32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -219,11 +217,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgra32(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba64(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Bgra32 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -237,7 +235,6 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromBgra32(sp);
}
}
-
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.tt
index 6563ff9072..004ceff51e 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Bgra32.PixelOperations.Generated.tt
@@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
- <#
- GenerateAllDefaultConversionMethods("Bgra32");
- #>
-
- }
- }
+ <# GenerateAllDefaultConversionMethods("Bgra32"); #>
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.cs
index 81882185d1..288c5d92e4 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromGray16(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,17 +35,17 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToGray16(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
-
- ///
+
+ ///
internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -60,11 +59,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgr24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -78,11 +77,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -96,11 +95,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray8(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -114,11 +113,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -132,11 +131,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -150,11 +149,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb48(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -168,11 +167,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba64(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray16 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -186,7 +185,6 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray16(sp);
}
}
-
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.tt
index 3db96d70a9..3cbc01e88c 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray16.PixelOperations.Generated.tt
@@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
- <#
- GenerateAllDefaultConversionMethods("Gray16");
- #>
-
- }
- }
+ <# GenerateAllDefaultConversionMethods("Gray16"); #>
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.cs
index f6678a4f87..f7e94788e3 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromGray8(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,17 +35,17 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToGray8(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
-
- ///
+
+ ///
internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -60,11 +59,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgr24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -78,11 +77,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -96,11 +95,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray16(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -114,11 +113,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -132,11 +131,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -150,11 +149,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb48(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -168,11 +167,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba64(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Gray8 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -186,7 +185,6 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromGray8(sp);
}
}
-
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.tt
index a65d8f2634..d35843ccda 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Gray8.PixelOperations.Generated.tt
@@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
- <#
- GenerateAllDefaultConversionMethods("Gray8");
- #>
-
- }
- }
+ <# GenerateAllDefaultConversionMethods("Gray8"); #>
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.cs
index aae8b2f637..dbf3102c4a 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromRgb24(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,42 +35,41 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToRgb24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
-
- ///
- internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
- }
-
- ///
- internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
- }
-
- ///
- internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
- {
- Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
- }
-
- ///
- internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
- {
- Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
- }
-
-
- ///
+ ///
+ internal override void FromVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, false);
+ }
+
+ ///
+ internal override void ToVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, false);
+ }
+
+ ///
+ internal override void FromScaledVector4(Configuration configuration, ReadOnlySpan sourceVectors, Span destPixels)
+ {
+ Vector4Converters.RgbaCompatible.FromVector4(configuration, this, sourceVectors, destPixels, true);
+ }
+
+ ///
+ internal override void ToScaledVector4(Configuration configuration, ReadOnlySpan sourcePixels, Span destVectors)
+ {
+ Vector4Converters.RgbaCompatible.ToVector4(configuration, this, sourcePixels, destVectors, true);
+ }
+
+
+ ///
internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -85,11 +83,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgr24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -103,11 +101,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -121,11 +119,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray8(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -139,11 +137,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray16(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -157,11 +155,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -175,11 +173,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb48(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -193,11 +191,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba64(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb24 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -211,7 +209,6 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb24(sp);
}
}
-
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.tt
index 796cdeb662..d96c3684b5 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.tt
@@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
- <#
- GenerateAllDefaultConversionMethods("Rgb24");
- #>
-
- }
- }
+ <# GenerateAllDefaultConversionMethods("Rgb24"); #>
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.cs
index c828053a4c..30c9972bbf 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromRgb48(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,17 +35,17 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToRgb48(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
-
- ///
+
+ ///
internal override void ToArgb32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -60,11 +59,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgr24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -78,11 +77,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- ///
+
+ ///
internal override void ToBgra32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -96,11 +95,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray8(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -114,11 +113,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- ///
+
+ ///
internal override void ToGray16(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -132,11 +131,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgb24(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -150,11 +149,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -168,11 +167,11 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- ///
+
+ ///
internal override void ToRgba64(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
ref Rgb48 sourceRef = ref MemoryMarshal.GetReference(sourcePixels);
@@ -186,7 +185,6 @@ namespace SixLabors.ImageSharp.PixelFormats
dp.FromRgb48(sp);
}
}
-
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.tt b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.tt
index b8ee99fce1..7bff336386 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.tt
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb48.PixelOperations.Generated.tt
@@ -13,10 +13,7 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal class PixelOperations : PixelOperations
{
- <#
- GenerateAllDefaultConversionMethods("Rgb48");
- #>
-
- }
- }
+ <# GenerateAllDefaultConversionMethods("Rgb48"); #>
+ }
+ }
}
\ No newline at end of file
diff --git a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgba32.PixelOperations.Generated.cs b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgba32.PixelOperations.Generated.cs
index 9c29bd0445..da2ce3770b 100644
--- a/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgba32.PixelOperations.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgba32.PixelOperations.Generated.cs
@@ -23,11 +23,10 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal partial class PixelOperations : PixelOperations
{
-
- ///
+ ///
internal override void FromRgba32(Configuration configuration, ReadOnlySpan source, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(source, destPixels, nameof(destPixels));
source.CopyTo(destPixels);
@@ -36,16 +35,16 @@ namespace SixLabors.ImageSharp.PixelFormats
///
internal override void ToRgba32(Configuration configuration, ReadOnlySpan sourcePixels, Span destPixels)
{
- Guard.NotNull(configuration, nameof(configuration));
+ Guard.NotNull(configuration, nameof(configuration));
Guard.DestinationShouldNotBeTooShort(sourcePixels, destPixels, nameof(destPixels));
sourcePixels.CopyTo(destPixels);
}
- ///