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
TSelfThe 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
Returns
- TSelf
The
TSelf.
FromArgb32(Argb32)
Initializes the pixel instance from an Argb32 value.
public static abstract TSelf FromArgb32(Argb32 source)
Parameters
Returns
- TSelf
The
TSelf.
FromBgr24(Bgr24)
Initializes the pixel instance from an Bgr24 value.
public static abstract TSelf FromBgr24(Bgr24 source)
Parameters
Returns
- TSelf
The
TSelf.
FromBgra32(Bgra32)
Initializes the pixel instance from an Bgra32 value.
public static abstract TSelf FromBgra32(Bgra32 source)
Parameters
Returns
- TSelf
The
TSelf.
FromBgra5551(Bgra5551)
Initializes the pixel instance from an Bgra5551 value.
public static abstract TSelf FromBgra5551(Bgra5551 source)
Parameters
Returns
- TSelf
The
TSelf.
FromL16(L16)
Initializes the pixel instance from an L16 value.
public static abstract TSelf FromL16(L16 source)
Parameters
Returns
- TSelf
The
TSelf.
FromL8(L8)
Initializes the pixel instance from an L8 value.
public static abstract TSelf FromL8(L8 source)
Parameters
Returns
- TSelf
The
TSelf.
FromLa16(La16)
Initializes the pixel instance from an La16 value.
public static abstract TSelf FromLa16(La16 source)
Parameters
Returns
- TSelf
The
TSelf.
FromLa32(La32)
Initializes the pixel instance from an La32 value.
public static abstract TSelf FromLa32(La32 source)
Parameters
Returns
- TSelf
The
TSelf.
FromRgb24(Rgb24)
Initializes the pixel instance from an Rgb24 value.
public static abstract TSelf FromRgb24(Rgb24 source)
Parameters
Returns
- TSelf
The
TSelf.
FromRgb48(Rgb48)
Initializes the pixel instance from an Rgb48 value.
public static abstract TSelf FromRgb48(Rgb48 source)
Parameters
Returns
- TSelf
The
TSelf.
FromRgba32(Rgba32)
Initializes the pixel instance from an Rgba32 value.
public static abstract TSelf FromRgba32(Rgba32 source)
Parameters
Returns
- TSelf
The
TSelf.
FromRgba64(Rgba64)
Initializes the pixel instance from an Rgba64 value.
public static abstract TSelf FromRgba64(Rgba64 source)
Parameters
Returns
- TSelf
The
TSelf.
FromScaledVector4(Vector4)
Initializes the pixel instance from a generic a generic ("scaled") Vector4 representation
with values scaled and clamped between
public static abstract TSelf FromScaledVector4(Vector4 source)
Parameters
sourceVector4The 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
sourceVector4The vector to load the pixel from.
Returns
- TSelf
The
TSelf.