img_reset()

Clear an image structure and release any library-allocated memory

Synopsis:

#include <img/img.h>

int img_reset(img_t *img);

Since:

BlackBerry 10.2.0

Arguments:

img
The address of an img_t structure that you are finished using. The contents of the img_t are cleared and any memory allocated by the library is freed. If you loaded image data in IMG_INDIRECT mode, you must free your own image buffer after calling this function.

Library:

libimg

Use the -l img option to qcc to link against this library.

Description:

This function clears an image structure and releases any library-allocated memory. If the image was loaded in IMG_INDIRECT mode, you must free your own image buffer after calling this function.

Returns:

IMG_ERR_OK
Success. The image structure has been cleared and any library-allocated memory has been freed.
IMG_ERR_PARM
One of the parameters supplied was invalid.

Classification:

Image library

Safety:  
Interrupt handler No
Signal handler No
Thread No