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

# ImageFileGetInfo

Get information about image in file (in dipIO)

## SYNOPSIS

dip_Error dipio_ImageFileGetInfo ( imInfo, filename, format, addExtensions, recognised, resources )

## FUNCTION

This function opens an image file and fills a `dipio_ImageFileInformation` structure with the information from that file. `imInfo` is allocated by this function. Use `ImageFileInformationFree` to free this structure, or set the `resources` parameter for automatic deallocation. If `format` is 0, all different ImageRead functions are called in sequence until the correct format has been found. If you know the format, get the correct format ID through the registry functions. See File formats recognized by dipIO for a list of currently supported formats.

The boolean `addExtensions` specifies whether `ImageFileGetInfo` should try to add file format extensions to `filename`, if the registered file format reader fails to recognise `filename` straight away. The extensions are provided by the registered file readers.

If `recognised` is not zero, ImageFileGetInfo will set it to `DIP_TRUE` when it has been able to read `filename`, and it will set it to `DIP_FALSE` when it is not able to read the file. No error will be generated in this case.

## ARGUMENTS

Data type | Name | Description
`dipio_ImageFileInformation *` | `imInfo` | Output image file information. See `ImageFileInformationNew`
`dip_String` | `filename` | File name
`dip_int` | `format` | ID of file format
`dip_Boolean` | `addExtensions` | Add file format extensions to `filename`
`dip_Boolean *` | `recognised` | Pointer to boolean containing the file read status
`dip_Resources` | `resources` | Resources tracking structure. See `ResourcesNew`

## SEE ALSO

`ImageReadCSVInfo`, `ImageReadGIFInfo`, `ImageReadICSInfo`, `ImageReadLSMInfo`, `ImageReadPICInfo`, `ImageReadTIFFInfo`, `ImageReadJPEGInfo`, `ImageRead`, `ImageReadColour`, `ImageReadROI`

DIPlib on-line documentation | Function reference | Global function index