Function nvcvImageWrapDataConstruct

Function Documentation

NVCVStatus nvcvImageWrapDataConstruct(const NVCVImageData *data, NVCVImageDataCleanupFunc cleanup, void *ctxCleanup, NVCVImageHandle *handle)

Wraps an existing image buffer into an NVCV image instance constructed in given storage

It allows for interoperation of external image representations with NVCV. The created image type is NVCV_TYPE_IMAGE_WRAPDATA .

Parameters:
  • data[in] Image contents.

  • cleanup[in] Cleanup function to be called when the image is destroyed via nvcvImageDecRef If NULL, no cleanup function is defined.

  • ctxCleanup[in] Pointer to be passed unchanged to the cleanup function, if defined.

  • handle[out] Where the image instance handle will be written to.

    • Must not be NULL.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.

  • NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the image.

  • NVCV_SUCCESS – Operation executed successfully.