diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLab.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLab.cs index e79f51211..3ce14cdea 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLab.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLab.cs @@ -38,7 +38,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -71,7 +71,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -104,7 +104,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -137,7 +137,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -172,7 +172,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -204,7 +204,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -237,7 +237,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -269,7 +269,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -302,7 +302,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -335,7 +335,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -368,7 +368,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -401,7 +401,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -434,7 +434,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLch.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLch.cs index 601a874d5..3c9e6658c 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLch.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLch.cs @@ -38,7 +38,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -71,7 +71,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -104,7 +104,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -137,7 +137,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -170,7 +170,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -202,7 +202,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -235,7 +235,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -268,7 +268,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -301,7 +301,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -334,7 +334,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -367,7 +367,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -400,7 +400,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -433,7 +433,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLchuv.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLchuv.cs index 8d20ec0a6..01de79488 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLchuv.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLchuv.cs @@ -36,7 +36,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -69,7 +69,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -104,7 +104,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -137,7 +137,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -170,7 +170,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -203,7 +203,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -236,7 +236,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -269,7 +269,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -302,7 +302,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -335,7 +335,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -368,7 +368,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -401,7 +401,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -433,7 +433,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLuv.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLuv.cs index b58c83810..55b96c353 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLuv.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieLuv.cs @@ -32,7 +32,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -64,7 +64,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -131,7 +131,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -166,7 +166,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -198,7 +198,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -230,7 +230,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -262,7 +262,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -294,7 +294,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -326,7 +326,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -358,7 +358,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -390,7 +390,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -422,7 +422,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyy.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyy.cs index b50f699af..b77f48325 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyy.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyy.cs @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -132,7 +132,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -160,7 +160,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -193,7 +193,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -226,7 +226,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -259,7 +259,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -292,7 +292,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -325,7 +325,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -358,7 +358,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -391,7 +391,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -424,7 +424,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyz.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyz.cs index 2d70c83d6..5d110552a 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyz.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.CieXyz.cs @@ -41,7 +41,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -76,7 +76,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -111,7 +111,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -146,7 +146,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -178,7 +178,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -212,7 +212,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -246,7 +246,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -280,7 +280,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -315,7 +315,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -351,7 +351,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -383,7 +383,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -416,7 +416,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -450,7 +450,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Cmyk.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Cmyk.cs index bc6c9a949..6f8fe6146 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Cmyk.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Cmyk.cs @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -132,7 +132,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -165,7 +165,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -198,7 +198,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -231,7 +231,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -264,7 +264,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -297,7 +297,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -330,7 +330,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -363,7 +363,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -391,7 +391,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -424,7 +424,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsl.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsl.cs index d88c3a2f2..106e8956f 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsl.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsl.cs @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -132,7 +132,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -165,7 +165,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -198,7 +198,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -231,7 +231,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -264,7 +264,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -297,7 +297,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -330,7 +330,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -363,7 +363,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -391,7 +391,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -424,7 +424,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsv.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsv.cs index 01ade4375..8b4e29215 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsv.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Hsv.cs @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -132,7 +132,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -165,7 +165,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -198,7 +198,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -231,7 +231,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -264,7 +264,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -297,7 +297,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -330,7 +330,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -363,7 +363,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -391,7 +391,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -424,7 +424,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs index ddc225d1d..b3286a9cc 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.HunterLab.cs @@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -61,7 +61,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -125,7 +125,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -157,7 +157,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -192,7 +192,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -224,7 +224,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -256,7 +256,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -288,7 +288,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -320,7 +320,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -352,7 +352,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -384,7 +384,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -416,7 +416,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.LinearRgb.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.LinearRgb.cs index f230c0e6f..98943c034 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.LinearRgb.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.LinearRgb.cs @@ -32,7 +32,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -64,7 +64,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -96,7 +96,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -128,7 +128,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -160,7 +160,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -195,7 +195,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -227,7 +227,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -259,7 +259,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -291,7 +291,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -323,7 +323,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -355,7 +355,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -387,7 +387,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -419,7 +419,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Lms.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Lms.cs index 91162cb49..ffd0f88d1 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Lms.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Lms.cs @@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -61,7 +61,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -125,7 +125,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -157,7 +157,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -185,7 +185,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -217,7 +217,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -249,7 +249,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -281,7 +281,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -313,7 +313,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -345,7 +345,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -377,7 +377,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -409,7 +409,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Rgb.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Rgb.cs index 31ec3dd40..cd40c966b 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Rgb.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.Rgb.cs @@ -32,7 +32,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -64,7 +64,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -96,7 +96,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -128,7 +128,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -160,7 +160,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -195,7 +195,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -227,7 +227,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -259,7 +259,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -291,7 +291,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -323,7 +323,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -355,7 +355,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -387,7 +387,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -422,7 +422,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.YCbCr.cs b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.YCbCr.cs index 993108c40..38e6d5fae 100644 --- a/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.YCbCr.cs +++ b/src/ImageSharp/ColorSpaces/Conversion/ColorSpaceConverter.YCbCr.cs @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -132,7 +132,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -165,7 +165,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -198,7 +198,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -231,7 +231,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -264,7 +264,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -297,7 +297,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -330,7 +330,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -363,7 +363,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); @@ -391,7 +391,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion /// The span to the source colors /// The span to the destination colors /// The number of colors to convert. - public void Convert(Span source, Span destination, int count) + public void Convert(ReadOnlySpan source, Span destination, int count) { Guard.SpansMustBeSizedAtLeast(source, nameof(source), destination, nameof(destination), count); diff --git a/src/ImageSharp/Common/Helpers/Guard.cs b/src/ImageSharp/Common/Helpers/Guard.cs index 038d5c35c..34ba54472 100644 --- a/src/ImageSharp/Common/Helpers/Guard.cs +++ b/src/ImageSharp/Common/Helpers/Guard.cs @@ -264,5 +264,27 @@ namespace SixLabors.ImageSharp MustBeSizedAtLeast(source, minLength, sourceParamName); MustBeSizedAtLeast(dest, minLength, destParamName); } + + /// + /// Verifies that the given 'source' and 'dest' spans are at least of 'minLength' size. + /// Throwing an if the condition is not met. + /// + /// The source element type + /// The destination element type + /// The source span + /// The source parameter name + /// The destination span + /// The destination parameter name + /// The minimum length + public static void SpansMustBeSizedAtLeast( + ReadOnlySpan source, + string sourceParamName, + Span dest, + string destParamName, + int minLength) + { + MustBeSizedAtLeast(source, minLength, sourceParamName); + MustBeSizedAtLeast(dest, minLength, destParamName); + } } } diff --git a/tests/ImageSharp.Tests/Colorspaces/Conversion/CieLabAndCieLchuvConversionTests.cs b/tests/ImageSharp.Tests/Colorspaces/Conversion/CieLabAndCieLchuvConversionTests.cs index 58b2e5bdb..9c15401b5 100644 --- a/tests/ImageSharp.Tests/Colorspaces/Conversion/CieLabAndCieLchuvConversionTests.cs +++ b/tests/ImageSharp.Tests/Colorspaces/Conversion/CieLabAndCieLchuvConversionTests.cs @@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Tests.Colorspaces.Conversion /// public class CieLabAndCieLchuvConversionTests { - private static readonly ApproximateColorSpaceComparer ColorSpaceComparer = new ApproximateColorSpaceComparer(.0001F); + private static readonly ApproximateColorSpaceComparer ColorSpaceComparer = new ApproximateColorSpaceComparer(.0002F); private static readonly ColorSpaceConverter Converter = new ColorSpaceConverter(); /// @@ -68,7 +68,6 @@ namespace SixLabors.ImageSharp.Tests.Colorspaces.Conversion [InlineData(9.953703, -35.1176033, 16.8696461, 9.953705, 25.3788586, 141.070892)] [InlineData(9.805839, 55.69225, -36.6074753, 9.80584049, 35.3214073, 314.4875)] [InlineData(8.86916, -34.4068336, -42.2136269, 8.869162, 32.1432457, 227.960419)] - public void Convert_Lab_to_Lchuv(float l, float a, float b, float l2, float c, float h) { // Arrange