imgSessionCopyArea

NI IMAQ Function

imgSessionCopyArea

Usage

rval imgSessionCopyArea (SESSION_ID sid, uInt32 bufferIndex, uInt32 top, uInt32 left, uInt32 height, uInt32 width, void* buffer, uInt32 rowPixels, uInt32 waitForNext);

Purpose

Copies an area of a session buffer to a user-specified buffer.

Parameters

Name Type Direction
sid SESSION_ID input
bufferIndex uInt32 input
top uInt32 input
left uInt32 input
width uInt32 input
height uInt32 input
buffer void* input
rowPixels uInt32 input
vsync uInt32 input
rval Int32 output

Parameter Discussion

sid: valid SESSION_ID.

bufferIndex: valid buffer list index from which to copy.

top: top coordinate of the area to copy.

left: left coordinate of the area to copy.

height: height of the area to copy.

width: width of the area to copy.

buffer: buffer that receives the image.

rowPixels: number of pixels in each image line of the destination buffer. Passing a zero for this parameter causes the function to ignore the parameter and use the IMG_ATTR_ROWPIXELS attribute instead. Use this parameter for byte alignment or if the image buffer contains a border for image processing.

waitForNext: if zero, the function copies immediately. If non-zero, the function waits until the current acquisition is complete before copying.

Return Value

This function returns 0 on success. On failure, this function returns an error code. For information about the error code, call imgShowError.