ReadImageAndVisionInfo Method
Syntax
CWIMAQVision.ReadImageAndVisionInfo DestImage, Path [, ColorPalette]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Reads an image file, including any extra vision information saved with the image. This includes overlay information, pattern matching template information, custom data, and calibration information, as written by WriteImageAndVisionInfo.
Remarks
Use this method with U8, U16, I16, SGL, RGB32, and HSL32 images.
Parameters
DestImage As CWIMAQImage
The image to which the data from the image file is applied.
Path As String
The complete pathname, including drive, directory, and filename, for the file to be loaded. The file must be a PNG file.
ColorPalette As Variant
[Optional] On return, the color palette that the method read from the file if the table exists.
Example
Private Sub Run_Click() Dim path As String Dim i As New CWIMAQImage ' Read a file with vision information ' and the associated color palette and ' store it in the image in viewer1. CWIMAQVision1.ReadImageAndVisionInfo CWIMAQViewer1.Image, path, _ CWIMAQViewer1.Palette End Sub