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
bitsPerPixelintColor 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
BitsPerPixel
Gets color depth, in number of bits per pixel.
public int BitsPerPixel { get; init; }
Property Value
ColorType
Gets the pixel color type.
public PixelColorType ColorType { get; init; }
Property Value
ComponentInfo
Gets the component bit depth and padding within the pixel.
public PixelComponentInfo? ComponentInfo { get; init; }
Property Value
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
infoPixelComponentInfoThe pixel component info.
colorTypePixelColorTypeThe pixel color type.
alphaRepresentationPixelAlphaRepresentationThe pixel alpha representation.
Returns
Type Parameters
TPixelThe type of pixel format.