rprContextCreateImage

Creates an image from memory data.

Images are used as HDRI maps, texture maps, or inputs for various shading system nodes.

rpr_status rprContextCreateImage(

rpr_context context,

rpr_image_format const format,

rpr_image_desc const * image_desc,

void const * data,

rpr_image * out_image);

Parameters

Parameter

Description

context

The current rendering context.

format

Image format to be used.

image_desc

The image layout proportions.

data

Image data held in system memory, can be NULL in which case the memory is allocated.

out_image

A pointer to the created image object.

Notes

Images created this way are useful for common tasks such as texturing sources, emission maps and environment maps.

Output

A pointer to an image object.

Return

Returns RPR_SUCCESS in case of success, or RPR_ERROR code if a problem was encountered.

To learn how to handle errors in AMD Radeon ProRender SDK, see Error Handling.

Errors

Possible error codes:

  • RPR_ERROR_OUT_OF_VIDEO_MEMORY

  • RPR_ERROR_OUT_OF_SYSTEM_MEMORY

  • RPR_ERROR_UNSUPPORTED_IMAGE_FORMAT

  • RPR_ERROR_INVALID_PARAMETER