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.

ToRgba32()

Convert the pixel instance into Rgba32 representation.

Rgba32 ToRgba32()

Returns

Rgba32

The Rgba32

ToScaledVector4()

Expands the pixel into a generic ("scaled") Vector4 representation with values scaled and clamped between 0 and 1. The vector components are typically expanded in least to greatest significance order.

Vector4 ToScaledVector4()

Returns

Vector4

The Vector4.

ToVector4()

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

Vector4 ToVector4()

Returns

Vector4

The Vector4.