ReadFile Method

NI Vision for Visual Basic

ReadFile Method

Syntax

CWIMAQVision.ReadFile DestImage, Path, ColorTable [, LoadColorTable = False]

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Obsolete—Use ReadImage instead. Reads image information from a file. The file can be in one of the following formats: PNG, JPEG, TIFF, AIPD, or BMP.

Remarks

You can use this method with all image types.

Parameters

DestImage As CWIMAQImage

The image into which the method stores data it reads from the file.

Path As String

The complete pathname, including drive, directory, and filename, for the file to be loaded.

ColorTable As Variant

On return, the color table that the method read from the file if the table exists. You must set LoadColorTable to True to output the table.

LoadColorTable As Variant

[Optional] Determines whether to load the color table present in the file (if it exists). If loaded, this table is read and made available to the output ColorTable.

This parameter has a default value of False.

See Also

ReadImage