Radeon ProRender

rprContextCreateImageFromFileMemory

Similar to rprContextCreateImageFromFile, but rather than Radeon ProRender opening the file, a user must pass in a block of memory of an already opened file handle.

rpr_status rprContextCreateImageFromFileMemory( rpr_context context,
  rpr_char const * extension,
  void const * data,
  size_t dataSizeByte,
  rpr_image * out_image);

Parameters

Parameter Description
context The current rendering context.
extension Type of the image file in memory (png, jpg, etc).
data Pointer to the image data in memory.
dataSizeByte Total size of the image data.
out_image rpr_image to into load from memory.

Resolution has no fixed limit.

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_SYSTEM_MEMORY
  • RPR_ERROR_OUT_OF_VIDEO_MEMORY
  • RPR_ERROR_UNSUPPORTED_IMAGE_FORMAT
  • RPR_ERROR_INVALID_PARAMETER
  • RPR_ERROR_IO_ERROR