/// <inheritdoc /> internal override void FromVector4Destructive( Configuration configuration, Span <Vector4> sourceVectors, Span <RgbaVector> destinationColors, PixelConversionModifiers modifiers) { Guard.DestinationShouldNotBeTooShort(sourceVectors, destinationColors, nameof(destinationColors)); Vector4Converters.ApplyBackwardConversionModifiers(sourceVectors, modifiers); MemoryMarshal.Cast <Vector4, RgbaVector>(sourceVectors).CopyTo(destinationColors); }
/// <inheritdoc /> public override void FromVector4Destructive( Configuration configuration, Span <Vector4> sourceVectors, Span <Rgba32> destinationPixels, PixelConversionModifiers modifiers) { Guard.DestinationShouldNotBeTooShort(sourceVectors, destinationPixels, nameof(destinationPixels)); destinationPixels = destinationPixels.Slice(0, sourceVectors.Length); Vector4Converters.ApplyBackwardConversionModifiers(sourceVectors, modifiers); SimdUtils.NormalizedFloatToByteSaturate( MemoryMarshal.Cast <Vector4, float>(sourceVectors), MemoryMarshal.Cast <Rgba32, byte>(destinationPixels)); }