Copy Method

NI Vision for Visual Basic

Copy Method

Syntax

CWIMAQVision.Copy SourceImage, DestImage

Return Type

Long

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

Purpose

Copies the source image to the destination image, including the border size and calibration information. To copy an area of one image to an area of another image, use the Extract2 method with xSubsample and ySubsample set to 1.

Remarks

Use this method with all image types.

The source and destination images must be the same type of image. The method copies the complete definition of the source image and its pixel data to the destination image. The method also modifies the border of the destination image so that it becomes the same size as the border of the source image.

Parameters

SourceImage As CWIMAQImage

The source image to copy.

DestImage As CWIMAQImage

The resulting image.

Example

Dim i As New CWIMAQImage

' Copy the image in Viewer1 into i
CWIMAQVision1.Copy CWIMAQViewer1.Image, i

See Also

Extract2