deleteImageMem

Functions
deleteImageMem
Complete List of ArrayFire Functions ArrayFire Functions by Category » Input and Output functions » | Reading and writing images

Delete memory created by saveImageMem and af_save_image_memory function. More...

## Functions
AFAPI void | deleteImageMem (void *ptr)
| C++ Interface for deleting memory created by saveImageMem or af_save_image_memory. More...
AFAPI af_err | af_delete_image_memory (void *ptr)
| C Interface for deleting an image from memory. More...

## Detailed Description

Delete memory created by saveImageMem and af_save_image_memory function.

This internally calls FreeImage_CloseMemory.

Supported formats include JPG, PNG, PPM and other formats supported by freeimage

## Function Documentation

## ◆ af_delete_image_memory()

AFAPI af_err af_delete_image_memory | ( | void * | ptr | ) |

C Interface for deleting an image from memory.

Parameters

  [in] | ptr | is the FIMEMORY pointer created by either saveImageMem function, the af_save_image_memory function, or the FreeImage_OpenMemory API.

Returns
  AF_SUCCESS if successful

## ◆ deleteImageMem()

AFAPI void af::deleteImageMem | ( | void * | ptr | ) |

C++ Interface for deleting memory created by saveImageMem or af_save_image_memory.

Parameters

  [in] | ptr | is the pointer to the FreeImage stream created by saveImageMem.