Class ImageFormat
Defined in File ImageFormat.hpp
Class Documentation
-
class ImageFormat
Public Functions
-
constexpr ImageFormat()
-
explicit constexpr ImageFormat(NVCVImageFormat format)
Constructor that initializes from a native format representation.
- Parameters:
format – The native format to initialize from.
-
inline ImageFormat(ColorSpec colorSpec, ChromaSubsampling chromaSub, MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED, const ExtraChannelInfo *exChannelInfo = 0)
Constructs an
ImageFormat
using the provided parameters.- Parameters:
colorSpec – Specification of the color.
chromaSub – Chroma subsampling information.
memLayout – Memory layout type.
dataKind – Kind of data (e.g., float, integer).
swizzle – Channel swizzling information.
packing0 – Primary packing format.
packing1 – Secondary packing format (optional).
packing2 – Tertiary packing format (optional).
packing3 – Quaternary packing format (optional).
-
inline ImageFormat(ColorModel colorModel, ColorSpec colorSpec, MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED, const ExtraChannelInfo *exChannelInfo = 0)
Constructs an
ImageFormat
using the provided parameters.- Parameters:
colorModel – Model of the color representation (e.g., RGB, YUV).
colorSpec – Specification of the color.
memLayout – Memory layout type.
dataKind – Kind of data (e.g., float, integer).
swizzle – Channel swizzling information.
packing0 – Primary packing format.
packing1 – Secondary packing format (optional).
packing2 – Tertiary packing format (optional).
packing3 – Quaternary packing format (optional).
-
inline ImageFormat(MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED, const ExtraChannelInfo *exChannelInfo = 0)
Constructs an
ImageFormat
using the given memory layout, data kind, swizzle, and packing parameters.- Parameters:
memLayout – Memory layout type.
dataKind – Kind of data (e.g., float, integer).
swizzle – Channel swizzling information.
packing0 – Primary packing format.
packing1 – Secondary packing format (optional).
packing2 – Tertiary packing format (optional).
packing3 – Quaternary packing format (optional).
-
inline ImageFormat(RawPattern rawPattern, MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED, const ExtraChannelInfo *exChannelInfo = 0)
Constructs an
ImageFormat
using a raw pattern along with other parameters.- Parameters:
rawPattern – Pattern of raw data.
memLayout – Memory layout type.
dataKind – Kind of data (e.g., float, integer).
swizzle – Channel swizzling information.
packing0 – Primary packing format.
packing1 – Secondary packing format (optional).
packing2 – Tertiary packing format (optional).
packing3 – Quaternary packing format (optional).
-
constexpr operator NVCVImageFormat() const noexcept
-
constexpr NVCVImageFormat cvalue() const noexcept
-
constexpr bool operator==(ImageFormat that) const noexcept
-
constexpr bool operator!=(ImageFormat that) const noexcept
-
inline ImageFormat dataKind(DataKind dataKind) const
-
inline ImageFormat memLayout(MemLayout newMemLayout) const
-
inline ImageFormat colorSpec(ColorSpec newColorSpec) const
-
inline ImageFormat chromaSubsampling(ChromaSubsampling css) const
-
inline ChromaSubsampling chromaSubsampling() const noexcept
-
inline ImageFormat rawPattern(RawPattern newRawPattern) const
-
inline RawPattern rawPattern() const noexcept
-
inline ImageFormat alphaType(AlphaType newAlphaType) const
-
inline void extraChannelInfo(ExtraChannelInfo *exChannelInfo) const noexcept
-
inline ImageFormat extraChannelInfo(const ExtraChannelInfo *newExChannelInfo) const
-
inline ColorModel colorModel() const noexcept
-
inline uint32_t fourCC() const
-
inline ImageFormat swizzleAndPacking(Swizzle newSwizzle, Packing newPacking0, Packing newPacking1, Packing newPacking2, Packing newPacking3) const
-
inline ImageFormat planeFormat(int32_t plane) const noexcept
Public Static Functions
-
static constexpr ImageFormat ConstCreate(ColorSpec colorSpec, ChromaSubsampling chromaSub, MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED)
Const versions of
ImageFormat
using the provided parameters.
-
static constexpr ImageFormat ConstCreate(ColorModel colorModel, ColorSpec colorSpec, MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED)
-
static constexpr ImageFormat ConstCreate(MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED)
-
static constexpr ImageFormat ConstCreate(RawPattern rawPattern, MemLayout memLayout, DataKind dataKind, Swizzle swizzle, Packing packing0, Packing packing1 = Packing::NONE, Packing packing2 = Packing::NONE, Packing packing3 = Packing::NONE, AlphaType alphaType = AlphaType::ASSOCIATED)
-
static inline ImageFormat FromFourCC(uint32_t fourcc, ColorSpec colorSpec, MemLayout memLayout)
Creates an
ImageFormat
from a given FourCC code and other parameters.- Parameters:
fourcc – The FourCC code representing the format.
colorSpec – Specification of the color.
memLayout – Memory layout type.
- Returns:
An
ImageFormat
object constructed from the FourCC code.
-
static inline ImageFormat FromPlanes(ImageFormat plane0, ImageFormat plane1 = {}, ImageFormat plane2 = {}, ImageFormat plane3 = {})
Creates an
ImageFormat
that represents a combination of multiple image planes.- Parameters:
plane0 – Primary image plane format.
plane1 – Secondary image plane format (optional).
plane2 – Tertiary image plane format (optional).
plane3 – Quaternary image plane format (optional).
- Returns:
An
ImageFormat
object representing multiple image planes.
-
constexpr ImageFormat()