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

# ImageNew

Allocate a structure

## SYNOPSIS

dip_Error dip_ImageNew( image, resources )

## FUNCTION

Allocates a `dip_Image` structure and initializes all fields to their default values. The resulting image is in the "raw" state, see The image structure. By using `ImageCopyProperties` and the "ImageSet" access functions, the image fields can be set to their desired values. Pixel data for the image can be allocated using the `ImageForge` function, which will will put the image in the "forged" state.

## ARGUMENTS

Data type | Name | Description
`dip_Image *` | `image` | Used to return the newly allocated image
`dip_Resources` | `resources` | Resources tracking structure. See `ResourcesNew`

## SEE ALSO

The image structure

`ImageFree`, `ImageForge`, `ImageStrip`, `ImageCopyProperties`