Table of Contents

Struct PixelTypeInfo

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

Contains information about the pixels that make up an images visual data.

public readonly struct PixelTypeInfo
Inherited Members

Remarks

Initializes a new instance of the PixelTypeInfo struct.

Constructors

PixelTypeInfo(int)

Contains information about the pixels that make up an images visual data.

public PixelTypeInfo(int bitsPerPixel)

Parameters

bitsPerPixel int

Color depth, in number of bits per pixel.

Remarks

Initializes a new instance of the PixelTypeInfo struct.

Properties

AlphaRepresentation

Gets the pixel alpha transparency behavior. null means unknown, unspecified.

public PixelAlphaRepresentation AlphaRepresentation { get; init; }

Property Value

PixelAlphaRepresentation

BitsPerPixel

Gets color depth, in number of bits per pixel.

public int BitsPerPixel { get; init; }

Property Value

int

ColorType

Gets the pixel color type.

public PixelColorType ColorType { get; init; }

Property Value

PixelColorType

ComponentInfo

Gets the component bit depth and padding within the pixel.

public PixelComponentInfo? ComponentInfo { get; init; }

Property Value

PixelComponentInfo?

Methods

Create<TPixel>(PixelComponentInfo, PixelColorType, PixelAlphaRepresentation)

Creates a new PixelTypeInfo instance.

public static PixelTypeInfo Create<TPixel>(PixelComponentInfo info, PixelColorType colorType, PixelAlphaRepresentation alphaRepresentation) where TPixel : unmanaged, IPixel<TPixel>

Parameters

info PixelComponentInfo

The pixel component info.

colorType PixelColorType

The pixel color type.

alphaRepresentation PixelAlphaRepresentation

The pixel alpha representation.

Returns

PixelTypeInfo

The PixelComponentInfo.

Type Parameters

TPixel

The type of pixel format.