A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

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

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

## 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 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.