Browse Source

fix RgbaVector

af/merge-core
Anton Firszov 7 years ago
parent
commit
d33be1cba4
  1. 22
      src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.PixelOperations.cs

22
src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.PixelOperations.cs

@ -29,16 +29,7 @@ namespace SixLabors.ImageSharp.PixelFormats
Guard.DestinationShouldNotBeTooShort(sourceVectors, destinationColors, nameof(destinationColors));
Vector4Converters.ApplyBackwardConversionModifiers(sourceVectors, modifiers);
// TODO: Repeating previous override behavior here. Not sure if this is correct!
if (modifiers.IsDefined(PixelConversionModifiers.Scale))
{
MemoryMarshal.Cast<Vector4, RgbaVector>(sourceVectors).CopyTo(destinationColors);
}
else
{
base.FromVector4(configuration, sourceVectors, destinationColors, modifiers);
}
MemoryMarshal.Cast<Vector4, RgbaVector>(sourceVectors).CopyTo(destinationColors);
}
/// <inheritdoc />
@ -50,16 +41,7 @@ namespace SixLabors.ImageSharp.PixelFormats
{
Guard.DestinationShouldNotBeTooShort(sourcePixels, destVectors, nameof(destVectors));
// TODO: Repeating previous override behavior here. Not sure if this is correct!
if (modifiers.IsDefined(PixelConversionModifiers.Scale))
{
base.ToVector4(configuration, sourcePixels, destVectors, modifiers);
}
else
{
MemoryMarshal.Cast<RgbaVector, Vector4>(sourcePixels).CopyTo(destVectors);
}
MemoryMarshal.Cast<RgbaVector, Vector4>(sourcePixels).CopyTo(destVectors);
Vector4Converters.ApplyForwardConversionModifiers(destVectors, modifiers);
}
}

Loading…
Cancel
Save