Table of Contents

Interface IPixel<TSelf>

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

An interface that represents a generic pixel type. The naming convention of each pixel format is to order the color components from least significant to most significant, reading from left to right. For example in the Rgba32 pixel format the R component is the least significant byte, and the A component is the most significant.

public interface IPixel<TSelf> : IPixel, IEquatable<TSelf> where TSelf : unmanaged, IPixel<TSelf>

Type Parameters

TSelf

The type implementing this interface

Inherited Members

Methods

CreatePixelOperations()

Creates a PixelOperations<TPixel> instance for this pixel type. This method is not intended to be consumed directly. Use Instance instead.

public static abstract PixelOperations<TSelf> CreatePixelOperations()

Returns

PixelOperations<TSelf>

The PixelOperations<TPixel> instance.

FromAbgr32(Abgr32)

Initializes the pixel instance from an Abgr32 value.

public static abstract TSelf FromAbgr32(Abgr32 source)

Parameters

source Abgr32

The Abgr32 value.

Returns

TSelf

The TSelf.

FromArgb32(Argb32)

Initializes the pixel instance from an Argb32 value.

public static abstract TSelf FromArgb32(Argb32 source)

Parameters

source Argb32

The Argb32 value.

Returns

TSelf

The TSelf.

FromBgr24(Bgr24)

Initializes the pixel instance from an Bgr24 value.

public static abstract TSelf FromBgr24(Bgr24 source)

Parameters

source Bgr24

The Bgr24 value.

Returns

TSelf

The TSelf.

FromBgra32(Bgra32)

Initializes the pixel instance from an Bgra32 value.

public static abstract TSelf FromBgra32(Bgra32 source)

Parameters

source Bgra32

The Bgra32 value.

Returns

TSelf

The TSelf.

FromBgra5551(Bgra5551)

Initializes the pixel instance from an Bgra5551 value.

public static abstract TSelf FromBgra5551(Bgra5551 source)

Parameters

source Bgra5551

The Bgra5551 value.

Returns

TSelf

The TSelf.

FromL16(L16)

Initializes the pixel instance from an L16 value.

public static abstract TSelf FromL16(L16 source)

Parameters

source L16

The L16 value.

Returns

TSelf

The TSelf.

FromL8(L8)

Initializes the pixel instance from an L8 value.

public static abstract TSelf FromL8(L8 source)

Parameters

source L8

The L8 value.

Returns

TSelf

The TSelf.

FromLa16(La16)

Initializes the pixel instance from an La16 value.

public static abstract TSelf FromLa16(La16 source)

Parameters

source La16

The La16 value.

Returns

TSelf

The TSelf.

FromLa32(La32)

Initializes the pixel instance from an La32 value.

public static abstract TSelf FromLa32(La32 source)

Parameters

source La32

The La32 value.

Returns

TSelf

The TSelf.

FromRgb24(Rgb24)

Initializes the pixel instance from an Rgb24 value.

public static abstract TSelf FromRgb24(Rgb24 source)

Parameters

source Rgb24

The Rgb24 value.

Returns

TSelf

The TSelf.

FromRgb48(Rgb48)

Initializes the pixel instance from an Rgb48 value.

public static abstract TSelf FromRgb48(Rgb48 source)

Parameters

source Rgb48

The Rgb48 value.

Returns

TSelf

The TSelf.

FromRgba32(Rgba32)

Initializes the pixel instance from an Rgba32 value.

public static abstract TSelf FromRgba32(Rgba32 source)

Parameters

source Rgba32

The Rgba32 value.

Returns

TSelf

The TSelf.

FromRgba64(Rgba64)

Initializes the pixel instance from an Rgba64 value.

public static abstract TSelf FromRgba64(Rgba64 source)

Parameters

source Rgba64

The Rgba64 value.

Returns

TSelf

The TSelf.

FromScaledVector4(Vector4)

Initializes the pixel instance from a generic a generic ("scaled") Vector4 representation with values scaled and clamped between 0 and 1

public static abstract TSelf FromScaledVector4(Vector4 source)

Parameters

source Vector4

The vector to load the pixel from.

Returns

TSelf

The TSelf.

FromVector4(Vector4)

Initializes the pixel instance from a Vector4 which is specific to the current pixel type.

public static abstract TSelf FromVector4(Vector4 source)

Parameters

source Vector4

The vector to load the pixel from.

Returns

TSelf

The TSelf.