Camera.WaitForImage Method

Definition

Namespace: P1Sdk

Wait for the next captured image to arrive

public IIQImageFile WaitForImage(uint timeoutMs = 0);

Images are transferred as complete in-memory IIQ files. This memory is owned by the API sub-system, and must dispose it as soon as you are done. Before you can receive any images, you must call EnableImageReceiving to enable data transfer from the camera. Likewise, this method does not trigger an actual image capture - use TriggerCapture for that.

using(var image = camera.WaitForImage()) { using(var file = FileStream(image.FileName, FileMode.Create)) { image.Data.CopyTo(file); } }

Parameters:

timeoutMs

OPTIONAL: Amount of milliseconds to wait for an image. Zero is forever.

Returns:

An object descripting the in-memory IIQ file

See also:

TriggerCapture, EnableImageReceiving, WakeUpWaitingImageThreads