5#include "_cexports/c_img.h"
6#include "_cexports/c_pixfmtcnv.h"
9#include "pfnc_format.hpp"
17 inline HandleGuard<PixelFormatConverter>::HandleGuard(
void *handle) noexcept
18 : HandleGuard<PixelFormatConverter>(handle, [](
void *handle) { CVB_CALL_CAPI(ReleaseObject(handle)); })
39 : handleGuard_(CreateHandle(sourceFormat, destinationFormat))
40 , sourceFormat_(sourceFormat)
41 , destinationFormat_(destinationFormat)
61 return std::make_unique<PixelFormatConverter>(sourceFormat, destinationFormat);
73 return handleGuard_.Handle();
93 return destinationFormat_;
111 CVB_CALL_CAPI_CHECKED(
112 CVPFConverterExecute(handleGuard_.Handle(), sourceObject.Handle(), destinationObject.
Handle()));
118 void *handle =
nullptr;
119 CVB_CALL_CAPI_CHECKED(CVPFCreateConverter(
static_cast<Cvb::CExports::cvbuint32_t
>(sourceFormat),
120 static_cast<Cvb::CExports::cvbuint32_t
>(destinationFormat), handle));
127 HandleGuard<PixelFormatConverter> handleGuard_;
The Common Vision Blox image.
Definition: decl_image.hpp:45
void * Handle() const noexcept
Classic API image handle.
Definition: decl_image.hpp:226
PfncFormat
GenICam Pixel Format Naming Convention (PFNC) format values.
Definition: pfnc_format.hpp:21
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24