|
|
|
@ -287,12 +287,16 @@ namespace SixLabors.ImageSharp |
|
|
|
/// Bulk converts a span of <see cref="Color"/> to a span of a specified <typeparamref name="TPixel"/> type.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel type to convert to.</typeparam>
|
|
|
|
/// <param name="configuration">The configuration.</param>
|
|
|
|
/// <param name="source">The source color span.</param>
|
|
|
|
/// <param name="destination">The destination pixel span.</param>
|
|
|
|
[MethodImpl(InliningOptions.ShortMethod)] |
|
|
|
public static void ToPixel<TPixel>(ReadOnlySpan<Color> source, Span<TPixel> destination) |
|
|
|
#pragma warning disable RCS1163 // Unused parameter.
|
|
|
|
public static void ToPixel<TPixel>(Configuration configuration, ReadOnlySpan<Color> source, Span<TPixel> destination) |
|
|
|
#pragma warning restore RCS1163 // Unused parameter.
|
|
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
|
{ |
|
|
|
// TODO: Investigate bulk operations utilizing configuration parameter here.
|
|
|
|
Guard.DestinationShouldNotBeTooShort(source, destination, nameof(destination)); |
|
|
|
for (int i = 0; i < source.Length; i++) |
|
|
|
{ |
|
|
|
|