IMAQ ReadFile VI
Owning Palette: FilesInstalled With: NI Vision Development ModuleReads an image file. The file format can be a standard format (BMP, TIFF, JPEG, JPEG2000, PNG, and AIPD) or a nonstandard format known to the user. In all cases, the read pixels are converted automatically into the image type passed by Image.
![]() |
File Path is the complete pathname, including drive, directory, and filename, of the file to read. |
||||||||||||||||||||||||||||
![]() |
Image is a reference to the image to which data from the image file is applied. |
||||||||||||||||||||||||||||
![]() |
Load Color Palette? (No) determines whether to load the color table present in the file, if the color table exists. If loaded, this table is read and returned by the output Color Palette. The default is FALSE. |
||||||||||||||||||||||||||||
![]() |
File Options is a cluster of user-optional values that you can use to read nonstandard file formats. The structure must be known to the user. This cluster consists of the following elements:
|
||||||||||||||||||||||||||||
![]() |
error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
|
||||||||||||||||||||||||||||
![]() |
Color Palette out contains the RGB color table (if the file has one) read from the file when the user passes the value TRUE for the input Load Color Palette? (No).
|
||||||||||||||||||||||||||||
![]() |
Image Out is a reference to the destination image. If Image Dst is connected, Image Dst Out is the same as Image Dst. Otherwise, Image Dst Out refers to the image referenced by Image Src. |
||||||||||||||||||||||||||||
![]() |
File Type out indicates the file type that is read. This string returns an identifier of the file format, which can be BMP, TIFF, JPEG, PNG, or AIPD (internal file format). File Type returns xxx if the file format is unknown. |
||||||||||||||||||||||||||||
![]() |
File Data Type out indicates the pixel size defined in the header for standard image file types. File Options are not necessary for reading standard image files. For other types of image files, the returned values are passed from File Options/File Data Type. |
||||||||||||||||||||||||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.
|
Examples
Refer to the following for an example that uses this VI.
- LabVIEW\examples\Vision\2. Functions\Analysis\Histogram Example.vi