rifContextCreateImage

Creates a new image object with the defined format associated with the context.

rif_int rifContextCreateImage(

rif_context context,

rif_image_desc const * image_desc,

void const * data,

rif_image * out_image);

Parameters

Parameter

Input/Output

Description

context

input

A valid context object.

image_desc

input

A description of image size and image pixels format.

data

input

A pointer to host data storage.

out_image

output

A pointer to the image object which will be created if the function performs successfully.

Return

Returns RIF_SUCCESS if the function is executed successfully, or RIF_ERROR code if a problem is encountered.

Errors

Possible error codes:

  • RIF_ERROR_INVALID_CONTEXT - context is not a valid context object.

  • RIF_ERROR_INVALID_PARAMETER - out_image nullptr.

  • RIF_ERROR_UNSUPPORTED_IMAGE_FORMAT - image format defined by image_desc is currently unsupported.