Table of Contents

Class PixelOperations<TPixel>

Namespace
SixLabors.ImageSharp.PixelFormats
Assembly
SixLabors.ImageSharp.dll

Provides bulk conversion operations for pixel buffers of type TPixel.

public class PixelOperations<TPixel> where TPixel : unmanaged, IPixel<TPixel>

Type Parameters

TPixel

The pixel format.

Inheritance
PixelOperations<TPixel>
Derived
Inherited Members

Remarks

The default conversion behavior is suitable for pixel formats that store unassociated alpha. Pixel formats that store associated alpha should derive their operations from AssociatedAlphaPixelOperations<TPixel>.

Properties

Instance

Gets the global PixelOperations<TPixel> instance for the pixel type TPixel

public static PixelOperations<TPixel> Instance { get; }

Property Value

PixelOperations<TPixel>

Methods

FromAbgr32(Configuration, ReadOnlySpan<Abgr32>, Span<TPixel>)

Converts all pixels in 'source` span of Abgr32 into a span of TPixel-s.

public virtual void FromAbgr32(Configuration configuration, ReadOnlySpan<Abgr32> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Abgr32>

The source Span<T> of Abgr32 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromAbgr32Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromAbgr32(Configuration, ReadOnlySpan<Abgr32>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Abgr32 layout.

public void FromAbgr32Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromArgb32(Configuration, ReadOnlySpan<Argb32>, Span<TPixel>)

Converts all pixels in 'source` span of Argb32 into a span of TPixel-s.

public virtual void FromArgb32(Configuration configuration, ReadOnlySpan<Argb32> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Argb32>

The source Span<T> of Argb32 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromArgb32Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromArgb32(Configuration, ReadOnlySpan<Argb32>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Argb32 layout.

public void FromArgb32Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromAssociatedScaledVector4Destructive(Configuration, Span<Vector4>, Span<TPixel>)

Converts associated scaled vectors to pixels.

protected virtual void FromAssociatedScaledVector4Destructive(Configuration configuration, Span<Vector4> source, Span<TPixel> destination)

Parameters

configuration Configuration

The configuration.

source Span<Vector4>

The source vectors. Implementations may modify this buffer during conversion.

destination Span<TPixel>

The destination pixels.

FromAssociatedVector4Destructive(Configuration, Span<Vector4>, Span<TPixel>)

Converts associated vectors in the pixel format's native numeric range to pixels.

protected virtual void FromAssociatedVector4Destructive(Configuration configuration, Span<Vector4> source, Span<TPixel> destination)

Parameters

configuration Configuration

The configuration.

source Span<Vector4>

The source vectors. Implementations may modify this buffer during conversion.

destination Span<TPixel>

The destination pixels.

FromBgr24(Configuration, ReadOnlySpan<Bgr24>, Span<TPixel>)

Converts all pixels in 'source` span of Bgr24 into a span of TPixel-s.

public virtual void FromBgr24(Configuration configuration, ReadOnlySpan<Bgr24> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Bgr24>

The source Span<T> of Bgr24 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromBgr24Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromBgr24(Configuration, ReadOnlySpan<Bgr24>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Bgr24 layout.

public void FromBgr24Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromBgra32(Configuration, ReadOnlySpan<Bgra32>, Span<TPixel>)

Converts all pixels in 'source` span of Bgra32 into a span of TPixel-s.

public virtual void FromBgra32(Configuration configuration, ReadOnlySpan<Bgra32> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Bgra32>

The source Span<T> of Bgra32 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromBgra32Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromBgra32(Configuration, ReadOnlySpan<Bgra32>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Bgra32 layout.

public void FromBgra32Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromBgra5551(Configuration, ReadOnlySpan<Bgra5551>, Span<TPixel>)

Converts all pixels in 'source` span of Bgra5551 into a span of TPixel-s.

public virtual void FromBgra5551(Configuration configuration, ReadOnlySpan<Bgra5551> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Bgra5551>

The source Span<T> of Bgra5551 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromBgra5551Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromBgra5551(Configuration, ReadOnlySpan<Bgra5551>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Bgra5551 layout.

public void FromBgra5551Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromL16(Configuration, ReadOnlySpan<L16>, Span<TPixel>)

Converts all pixels in 'source` span of L16 into a span of TPixel-s.

public virtual void FromL16(Configuration configuration, ReadOnlySpan<L16> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<L16>

The source Span<T> of L16 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromL16Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromL16(Configuration, ReadOnlySpan<L16>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with L16 layout.

public void FromL16Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromL8(Configuration, ReadOnlySpan<L8>, Span<TPixel>)

Converts all pixels in 'source` span of L8 into a span of TPixel-s.

public virtual void FromL8(Configuration configuration, ReadOnlySpan<L8> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<L8>

The source Span<T> of L8 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromL8Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromL8(Configuration, ReadOnlySpan<L8>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with L8 layout.

public void FromL8Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromLa16(Configuration, ReadOnlySpan<La16>, Span<TPixel>)

Converts all pixels in 'source` span of La16 into a span of TPixel-s.

public virtual void FromLa16(Configuration configuration, ReadOnlySpan<La16> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<La16>

The source Span<T> of La16 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromLa16Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromLa16(Configuration, ReadOnlySpan<La16>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with La16 layout.

public void FromLa16Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromLa32(Configuration, ReadOnlySpan<La32>, Span<TPixel>)

Converts all pixels in 'source` span of La32 into a span of TPixel-s.

public virtual void FromLa32(Configuration configuration, ReadOnlySpan<La32> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<La32>

The source Span<T> of La32 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromLa32Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromLa32(Configuration, ReadOnlySpan<La32>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with La32 layout.

public void FromLa32Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromRgb24(Configuration, ReadOnlySpan<Rgb24>, Span<TPixel>)

Converts all pixels in 'source` span of Rgb24 into a span of TPixel-s.

public virtual void FromRgb24(Configuration configuration, ReadOnlySpan<Rgb24> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Rgb24>

The source Span<T> of Rgb24 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromRgb24Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromRgb24(Configuration, ReadOnlySpan<Rgb24>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Rgb24 layout.

public void FromRgb24Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromRgb48(Configuration, ReadOnlySpan<Rgb48>, Span<TPixel>)

Converts all pixels in 'source` span of Rgb48 into a span of TPixel-s.

public virtual void FromRgb48(Configuration configuration, ReadOnlySpan<Rgb48> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Rgb48>

The source Span<T> of Rgb48 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromRgb48Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromRgb48(Configuration, ReadOnlySpan<Rgb48>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Rgb48 layout.

public void FromRgb48Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromRgba32(Configuration, ReadOnlySpan<Rgba32>, Span<TPixel>)

Converts all pixels in 'source` span of Rgba32 into a span of TPixel-s.

public virtual void FromRgba32(Configuration configuration, ReadOnlySpan<Rgba32> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Rgba32>

The source Span<T> of Rgba32 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromRgba32Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromRgba32(Configuration, ReadOnlySpan<Rgba32>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Rgba32 layout.

public void FromRgba32Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromRgba64(Configuration, ReadOnlySpan<Rgba64>, Span<TPixel>)

Converts all pixels in 'source` span of Rgba64 into a span of TPixel-s.

public virtual void FromRgba64(Configuration configuration, ReadOnlySpan<Rgba64> source, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<Rgba64>

The source Span<T> of Rgba64 data.

destination Span<TPixel>

The Span<T> to the destination pixels.

FromRgba64Bytes(Configuration, ReadOnlySpan<byte>, Span<TPixel>, int)

A helper for FromRgba64(Configuration, ReadOnlySpan<Rgba64>, Span<TPixel>) that expects a byte span. The layout of the data in 'sourceBytes' must be compatible with Rgba64 layout.

public void FromRgba64Bytes(Configuration configuration, ReadOnlySpan<byte> sourceBytes, Span<TPixel> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations.

sourceBytes ReadOnlySpan<byte>

The ReadOnlySpan<T> to the source bytes.

destination Span<TPixel>

The Span<T> to the destination pixels.

count int

The number of pixels to convert.

FromUnassociatedScaledVector4Destructive(Configuration, Span<Vector4>, Span<TPixel>)

Converts unassociated scaled vectors to pixels.

protected virtual void FromUnassociatedScaledVector4Destructive(Configuration configuration, Span<Vector4> source, Span<TPixel> destination)

Parameters

configuration Configuration

The configuration.

source Span<Vector4>

The source vectors. Implementations may modify this buffer during conversion.

destination Span<TPixel>

The destination pixels.

FromUnassociatedVector4Destructive(Configuration, Span<Vector4>, Span<TPixel>)

Converts unassociated vectors in the pixel format's native numeric range to pixels.

protected virtual void FromUnassociatedVector4Destructive(Configuration configuration, Span<Vector4> source, Span<TPixel> destination)

Parameters

configuration Configuration

The configuration.

source Span<Vector4>

The source vectors. Implementations may modify this buffer during conversion.

destination Span<TPixel>

The destination pixels.

FromVector4Destructive(Configuration, Span<Vector4>, Span<TPixel>)

Bulk version of FromVector4(Vector4) converting 'sourceVectors.Length' pixels into 'destinationColors'. The contents of sourceVectors are not preserved.

public void FromVector4Destructive(Configuration configuration, Span<Vector4> sourceVectors, Span<TPixel> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

sourceVectors Span<Vector4>

The source vectors. Their contents may be modified during conversion.

destination Span<TPixel>

The Span<T> to the destination colors.

Remarks

Callers must not rely on the contents of sourceVectors after this method returns.

FromVector4Destructive(Configuration, Span<Vector4>, Span<TPixel>, PixelConversionModifiers)

Converts vectors to pixels using the numeric range, alpha representation, and companding specified by modifiers. The contents of sourceVectors are not preserved.

public virtual void FromVector4Destructive(Configuration configuration, Span<Vector4> sourceVectors, Span<TPixel> destination, PixelConversionModifiers modifiers)

Parameters

configuration Configuration

The configuration.

sourceVectors Span<Vector4>

The source vectors. Their contents may be modified during conversion.

destination Span<TPixel>

The destination pixels.

modifiers PixelConversionModifiers

The representation of the source vectors and the transformations applied before storing the pixels.

Remarks

Callers must not rely on the contents of sourceVectors after this method returns.

From<TSourcePixel>(Configuration, ReadOnlySpan<TSourcePixel>, Span<TPixel>)

Bulk operation that converts source pixels from TSourcePixel format to TPixel destination pixels.

public virtual void From<TSourcePixel>(Configuration configuration, ReadOnlySpan<TSourcePixel> source, Span<TPixel> destination) where TSourcePixel : unmanaged, IPixel<TSourcePixel>

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<TSourcePixel>

The ReadOnlySpan<T> to the source pixels.

destination Span<TPixel>

The Span<T> to the destination pixels.

Type Parameters

TSourcePixel

The source pixel type.

GetPixelBlender(GraphicsOptions)

Find an instance of the pixel blender.

public PixelBlender<TPixel> GetPixelBlender(GraphicsOptions options)

Parameters

options GraphicsOptions

the blending and composition to apply

Returns

PixelBlender<TPixel>

A PixelBlender<TPixel>.

GetPixelBlender(PixelColorBlendingMode, PixelAlphaCompositionMode)

Find an instance of the pixel blender.

public virtual PixelBlender<TPixel> GetPixelBlender(PixelColorBlendingMode colorMode, PixelAlphaCompositionMode alphaMode)

Parameters

colorMode PixelColorBlendingMode

The color blending mode to apply

alphaMode PixelAlphaCompositionMode

The alpha composition mode to apply

Returns

PixelBlender<TPixel>

A PixelBlender<TPixel>.

GetPixelTypeInfo()

Gets the pixel type info for the given TPixel.

public PixelTypeInfo GetPixelTypeInfo()

Returns

PixelTypeInfo

The PixelTypeInfo.

ToAbgr32(Configuration, ReadOnlySpan<TPixel>, Span<Abgr32>)

Converts all pixels of the 'source` span to a span of Abgr32-s.

public virtual void ToAbgr32(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Abgr32> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Abgr32>

The destination span of Abgr32 data.

ToAbgr32Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToAbgr32(Configuration, ReadOnlySpan<TPixel>, Span<Abgr32>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Abgr32 layout.

public void ToAbgr32Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToArgb32(Configuration, ReadOnlySpan<TPixel>, Span<Argb32>)

Converts all pixels of the 'source` span to a span of Argb32-s.

public virtual void ToArgb32(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Argb32> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Argb32>

The destination span of Argb32 data.

ToArgb32Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToArgb32(Configuration, ReadOnlySpan<TPixel>, Span<Argb32>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Argb32 layout.

public void ToArgb32Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToAssociatedScaledVector4(Configuration, ReadOnlySpan<TPixel>, Span<Vector4>)

Converts pixels to associated scaled vectors.

protected virtual void ToAssociatedScaledVector4(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Vector4> destination)

Parameters

configuration Configuration

The configuration.

source ReadOnlySpan<TPixel>

The source pixels.

destination Span<Vector4>

The destination vectors.

ToAssociatedVector4(Configuration, ReadOnlySpan<TPixel>, Span<Vector4>)

Converts pixels to associated vectors in the pixel format's native numeric range.

protected virtual void ToAssociatedVector4(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Vector4> destination)

Parameters

configuration Configuration

The configuration.

source ReadOnlySpan<TPixel>

The source pixels.

destination Span<Vector4>

The destination vectors.

ToBgr24(Configuration, ReadOnlySpan<TPixel>, Span<Bgr24>)

Converts all pixels of the 'source` span to a span of Bgr24-s.

public virtual void ToBgr24(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Bgr24> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Bgr24>

The destination span of Bgr24 data.

ToBgr24Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToBgr24(Configuration, ReadOnlySpan<TPixel>, Span<Bgr24>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Bgr24 layout.

public void ToBgr24Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToBgra32(Configuration, ReadOnlySpan<TPixel>, Span<Bgra32>)

Converts all pixels of the 'source` span to a span of Bgra32-s.

public virtual void ToBgra32(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Bgra32> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Bgra32>

The destination span of Bgra32 data.

ToBgra32Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToBgra32(Configuration, ReadOnlySpan<TPixel>, Span<Bgra32>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Bgra32 layout.

public void ToBgra32Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToBgra5551(Configuration, ReadOnlySpan<TPixel>, Span<Bgra5551>)

Converts all pixels of the 'source` span to a span of Bgra5551-s.

public virtual void ToBgra5551(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Bgra5551> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Bgra5551>

The destination span of Bgra5551 data.

ToBgra5551Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToBgra5551(Configuration, ReadOnlySpan<TPixel>, Span<Bgra5551>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Bgra5551 layout.

public void ToBgra5551Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToL16(Configuration, ReadOnlySpan<TPixel>, Span<L16>)

Converts all pixels of the 'source` span to a span of L16-s.

public virtual void ToL16(Configuration configuration, ReadOnlySpan<TPixel> source, Span<L16> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<L16>

The destination span of L16 data.

ToL16Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToL16(Configuration, ReadOnlySpan<TPixel>, Span<L16>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with L16 layout.

public void ToL16Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToL8(Configuration, ReadOnlySpan<TPixel>, Span<L8>)

Converts all pixels of the 'source` span to a span of L8-s.

public virtual void ToL8(Configuration configuration, ReadOnlySpan<TPixel> source, Span<L8> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<L8>

The destination span of L8 data.

ToL8Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToL8(Configuration, ReadOnlySpan<TPixel>, Span<L8>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with L8 layout.

public void ToL8Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToLa16(Configuration, ReadOnlySpan<TPixel>, Span<La16>)

Converts all pixels of the 'source` span to a span of La16-s.

public virtual void ToLa16(Configuration configuration, ReadOnlySpan<TPixel> source, Span<La16> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<La16>

The destination span of La16 data.

ToLa16Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToLa16(Configuration, ReadOnlySpan<TPixel>, Span<La16>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with La16 layout.

public void ToLa16Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToLa32(Configuration, ReadOnlySpan<TPixel>, Span<La32>)

Converts all pixels of the 'source` span to a span of La32-s.

public virtual void ToLa32(Configuration configuration, ReadOnlySpan<TPixel> source, Span<La32> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<La32>

The destination span of La32 data.

ToLa32Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToLa32(Configuration, ReadOnlySpan<TPixel>, Span<La32>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with La32 layout.

public void ToLa32Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToRgb24(Configuration, ReadOnlySpan<TPixel>, Span<Rgb24>)

Converts all pixels of the 'source` span to a span of Rgb24-s.

public virtual void ToRgb24(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Rgb24> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Rgb24>

The destination span of Rgb24 data.

ToRgb24Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToRgb24(Configuration, ReadOnlySpan<TPixel>, Span<Rgb24>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Rgb24 layout.

public void ToRgb24Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToRgb48(Configuration, ReadOnlySpan<TPixel>, Span<Rgb48>)

Converts all pixels of the 'source` span to a span of Rgb48-s.

public virtual void ToRgb48(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Rgb48> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Rgb48>

The destination span of Rgb48 data.

ToRgb48Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToRgb48(Configuration, ReadOnlySpan<TPixel>, Span<Rgb48>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Rgb48 layout.

public void ToRgb48Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToRgba32(Configuration, ReadOnlySpan<TPixel>, Span<Rgba32>)

Converts all pixels of the 'source` span to a span of Rgba32-s.

public virtual void ToRgba32(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Rgba32> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Rgba32>

The destination span of Rgba32 data.

ToRgba32Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToRgba32(Configuration, ReadOnlySpan<TPixel>, Span<Rgba32>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Rgba32 layout.

public void ToRgba32Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToRgba64(Configuration, ReadOnlySpan<TPixel>, Span<Rgba64>)

Converts all pixels of the 'source` span to a span of Rgba64-s.

public virtual void ToRgba64(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Rgba64> destination)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The span of source pixels

destination Span<Rgba64>

The destination span of Rgba64 data.

ToRgba64Bytes(Configuration, ReadOnlySpan<TPixel>, Span<byte>, int)

A helper for ToRgba64(Configuration, ReadOnlySpan<TPixel>, Span<Rgba64>) that expects a byte span as destination. The layout of the data in 'destination' must be compatible with Rgba64 layout.

public void ToRgba64Bytes(Configuration configuration, ReadOnlySpan<TPixel> source, Span<byte> destination, int count)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source pixels.

destination Span<byte>

The Span<T> to the destination bytes.

count int

The number of pixels to convert.

ToUnassociatedScaledVector4(Configuration, ReadOnlySpan<TPixel>, Span<Vector4>)

Converts pixels to the unassociated scaled vector representation used by color operations.

protected virtual void ToUnassociatedScaledVector4(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Vector4> destination)

Parameters

configuration Configuration

The configuration.

source ReadOnlySpan<TPixel>

The source pixels.

destination Span<Vector4>

The destination vectors.

ToUnassociatedVector4(Configuration, ReadOnlySpan<TPixel>, Span<Vector4>)

Converts pixels to unassociated vectors in the pixel format's native numeric range.

protected virtual void ToUnassociatedVector4(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Vector4> destination)

Parameters

configuration Configuration

The configuration.

source ReadOnlySpan<TPixel>

The source pixels.

destination Span<Vector4>

The destination vectors.

ToVector4(Configuration, ReadOnlySpan<TPixel>, Span<Vector4>)

Bulk version of ToVector4() converting 'sourceColors.Length' pixels into 'destinationVectors'.

public void ToVector4(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Vector4> destinationVectors)

Parameters

configuration Configuration

A Configuration to configure internal operations

source ReadOnlySpan<TPixel>

The Span<T> to the source colors.

destinationVectors Span<Vector4>

The Span<T> to the destination vectors.

ToVector4(Configuration, ReadOnlySpan<TPixel>, Span<Vector4>, PixelConversionModifiers)

Converts pixels to vectors using the numeric range, alpha representation, and companding specified by modifiers.

public virtual void ToVector4(Configuration configuration, ReadOnlySpan<TPixel> source, Span<Vector4> destinationVectors, PixelConversionModifiers modifiers)

Parameters

configuration Configuration

The configuration.

source ReadOnlySpan<TPixel>

The source pixels.

destinationVectors Span<Vector4>

The destination vectors.

modifiers PixelConversionModifiers

The requested vector representation and the transformations applied after reading the pixels.

To<TDestinationPixel>(Configuration, ReadOnlySpan<TPixel>, Span<TDestinationPixel>)

Bulk operation that copies the source to destination in TDestinationPixel format.

public virtual void To<TDestinationPixel>(Configuration configuration, ReadOnlySpan<TPixel> source, Span<TDestinationPixel> destination) where TDestinationPixel : unmanaged, IPixel<TDestinationPixel>

Parameters

configuration Configuration

A Configuration to configure internal operations.

source ReadOnlySpan<TPixel>

The ReadOnlySpan<T> to the source pixels.

destination Span<TDestinationPixel>

The Span<T> to the destination pixels.

Type Parameters

TDestinationPixel

The destination pixel type.