|
|
|
@ -112,6 +112,33 @@ namespace SixLabors.ImageSharp.PixelFormats |
|
|
|
PixelConverter.FromArgb32.ToBgra32(source, dest); |
|
|
|
} |
|
|
|
/// <inheritdoc />
|
|
|
|
public override void ToAbgr32( |
|
|
|
Configuration configuration, |
|
|
|
ReadOnlySpan<Bgra32> sourcePixels, |
|
|
|
Span<Abgr32> destinationPixels) |
|
|
|
{ |
|
|
|
Guard.NotNull(configuration, nameof(configuration)); |
|
|
|
Guard.DestinationShouldNotBeTooShort(sourcePixels, destinationPixels, nameof(destinationPixels)); |
|
|
|
|
|
|
|
ReadOnlySpan<byte> source = MemoryMarshal.Cast<Bgra32, byte>(sourcePixels); |
|
|
|
Span<byte> dest = MemoryMarshal.Cast<Abgr32, byte>(destinationPixels); |
|
|
|
PixelConverter.FromBgra32.ToAbgr32(source, dest); |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public override void FromAbgr32( |
|
|
|
Configuration configuration, |
|
|
|
ReadOnlySpan<Abgr32> sourcePixels, |
|
|
|
Span<Bgra32> destinationPixels) |
|
|
|
{ |
|
|
|
Guard.NotNull(configuration, nameof(configuration)); |
|
|
|
Guard.DestinationShouldNotBeTooShort(sourcePixels, destinationPixels, nameof(destinationPixels)); |
|
|
|
|
|
|
|
ReadOnlySpan<byte> source = MemoryMarshal.Cast<Abgr32, byte>(sourcePixels); |
|
|
|
Span<byte> dest = MemoryMarshal.Cast<Bgra32, byte>(destinationPixels); |
|
|
|
PixelConverter.FromAbgr32.ToBgra32(source, dest); |
|
|
|
} |
|
|
|
/// <inheritdoc />
|
|
|
|
public override void ToRgb24( |
|
|
|
Configuration configuration, |
|
|
|
ReadOnlySpan<Bgra32> sourcePixels, |
|
|
|
|