Table of Contents

Interface IPixel

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

A base interface for all pixels, defining the mandatory operations to be implemented by a pixel type.

public interface IPixel

Methods

GetPixelTypeInfo()

Gets the pixel type information.

public static abstract PixelTypeInfo GetPixelTypeInfo()

Returns

PixelTypeInfo

The PixelTypeInfo.

ToAssociatedScaledVector4()

Expands the pixel into a generic ("scaled") Vector4 whose color components use associated alpha, representing color multiplied by the logical opacity represented by alpha. The scaled representation uses 0 and 1 as its nominal component bounds.

Vector4 ToAssociatedScaledVector4()

Returns

Vector4

The Vector4.

ToAssociatedVector4()

Expands the pixel into a Vector4 which is specific to the current pixel type and whose color components use associated alpha, representing color multiplied by the logical opacity represented by alpha.

Vector4 ToAssociatedVector4()

Returns

Vector4

The Vector4.

ToRgba32()

Convert the pixel instance into Rgba32 representation.

Rgba32 ToRgba32()

Returns

Rgba32

The Rgba32

ToScaledVector4()

Expands the pixel into a generic ("scaled") Vector4 representation using the pixel type's native alpha representation. The scaled representation uses 0 and 1 as its nominal component bounds. The vector components are typically expanded in least to greatest significance order.

Vector4 ToScaledVector4()

Returns

Vector4

The Vector4.

ToUnassociatedScaledVector4()

Expands the pixel into a generic ("scaled") Vector4 whose color components use unassociated alpha. The scaled representation uses 0 and 1 as its nominal component bounds. When alpha is zero and the pixel's native representation is associated, the color components remain unchanged because no unassociated value can be recovered.

Vector4 ToUnassociatedScaledVector4()

Returns

Vector4

The Vector4.

ToUnassociatedVector4()

Expands the pixel into a Vector4 which is specific to the current pixel type and whose color components use unassociated alpha. When alpha is zero and the pixel's native representation is associated, the color components remain unchanged because no unassociated value can be recovered.

Vector4 ToUnassociatedVector4()

Returns

Vector4

The Vector4.

ToVector4()

Expands the pixel into a Vector4 which is specific to the current pixel type and uses its native alpha representation. The vector components are typically expanded in least to greatest significance order.

Vector4 ToVector4()

Returns

Vector4

The Vector4.