imaqGetFileInfo

NI Vision for LabWindows/CVI Function

imaqGetFileInfo

Usage

int imaqGetFileInfo(const char* fileName, CalibrationUnit* calibrationUnit, float* calibrationX, float* calibrationY, int* width, int* height, ImageType* imageType);

Purpose

Returns information regarding the contents of an image file. You can retrieve information from the following image file formats: PNG, JPEG, JPEG2000, TIFF, AIPD, and BMP.

Parameters

Name

Type

Description

fileName const char* The name of the file from which the function gets information. This parameter is required and cannot be NULL.
calibrationUnit CalibrationUnit* On return, the calibration unit of the image. If the file does not have calibration information, the function sets calibrationUnit to IMAQ_UNDEFINED. Set this parameter to NULL if you do not need this information.
calibrationX float* On return, the interpixel distance in the x-direction. If the file does not have calibration information, the function sets calibrationX to 1. Set this parameter to NULL if you do not need this information.
calibrationY float* On return, the interpixel distance in the y-direction. If the file does not have calibration information, the function sets calibrationY to 1. Set this parameter to NULL if you do not need this information.
width int* On return, the width of the image. Set this parameter to NULL if you do not need this information.
height int* On return, the height of the image. Set this parameter to NULL if you do not need this information.
imageType ImageType* On return, the type of the image. Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().