Class NvCVImageComponentTypeExtensions
- Assembly
- VisioForge.Core.dll
Extension methods for VisioForge.Core.NvidiaMaxine.VideoEffects.API.NvCVImageComponentType that provide byte-size calculations.
public static class NvCVImageComponentTypeExtensionsInheritance
Inherited Members
Methods
GetComponentBytes(NvCVImageComponentType)
Returns the number of bytes required to store a single component (channel) value of the given type.
public static int GetComponentBytes(this NvCVImageComponentType componentType)Parameters
componentTypeNvCVImageComponentType-
The component data type.
Returns
- int
-
Byte size of the component type: 1 for U8, 2 for U16/S16/F16, 4 for U32/S32/F32, 8 for U64/S64/F64, or 0 for VisioForge.Core.NvidiaMaxine.VideoEffects.API.NvCVImageComponentType.NVCV_TYPE_UNKNOWN.
GetPixelBytes(NvCVImageComponentType, int)
Returns the number of bytes required to store a single pixel with the given component type and channel count.
public static int GetPixelBytes(this NvCVImageComponentType componentType, int numComponents)Parameters
componentTypeNvCVImageComponentType-
The component data type.
numComponentsint-
Number of channels (components) per pixel.
Returns
- int
-
Total bytes per pixel:
GetComponentBytes(componentType) * numComponents.