DIPlib Documentation - ©1995-2017 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 typeNameDescription
dipio_ImageFileInformation *imInfoOutput image file information. See ImageFileInformationNew
dip_StringfilenameFile name
dip_intformatID of file format
dip_BooleanaddExtensionsAdd file format extensions to filename
dip_Boolean *recognisedPointer to boolean containing the file read status
dip_ResourcesresourcesResources tracking structure. See ResourcesNew

SEE ALSO

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