DIPlib Documentation - ©1995-2015 Quantitative Imaging Group, Delft University of Technology.

# ImageFree

Free an image

## SYNOPSIS

dip_Error dip_ImageFree( image )

## FUNCTION

Free any pixel data associated with the image and return all fields to their initial ("raw") state by calling `ImageStrip`. Then the image structure itself is freed. Notice that you must pass a pointer to the image instead of the image itself. This allows `ImageFree` to set your image variable to zero, preventing further use of the now freed image.

Because `ImageNew` accepts a resources structure to keep track of allocated images, direct calls to `ImageFree` should be unnecessary.

## ARGUMENTS

Data type | Name | Description
`dip_Image *` | `image` | A pointer to the image to be freed

## SEE ALSO

The image structure

`ImageNew`, `ImageForge`, `ImageStrip`, `ImageCopyProperties`