Save an array to memory as an image using FreeImage stream (FIMEMORY).
More...
Save an array to memory as an image using FreeImage stream (FIMEMORY).
Supported formats include JPG, PNG, PPM and other formats supported by freeimage
C Interface for saving an image to memory using FreeImage.
- Parameters
-
[out] | ptr | is the FIMEMORY pointer created by FreeImage. |
[in] | in | is the arrayfire array to be saved as an image |
[in] | format | is the type of image to create in memory. The enum borrows from the FREE_IMAGE_FORMAT enum of FreeImage. Other values not included in af_image_format but included in FREE_IMAGE_FORMAT can also be passed to this function. |
- Returns
- AF_SUCCESS if successful.
C++ Interface for saving an image to memory.
- Parameters
-
[in] | in | is the arrayfire array to be saved as an image |
[in] | format | is the type of image to create in memory. The enum borrows from the FREE_IMAGE_FORMAT enum of FreeImage. Other values not included in imageFormat but included in FREE_IMAGE_FORMAT can also be passed to this function. |
- Returns
- a void* pointer which is a type cast of the FreeImage type FIMEMORY* pointer.
- Note
- Ensure that deleteImageMem is called on this pointer. Otherwise there will be memory leaks