ImageBuffer.Lock Method

Locks the buffer
Syntax:
[C#]
public void Lock();
Remarks:

Increments the lock count of the buffer by one, so that the control does not overwrite the data in the ImageBuffer. Each call to lock must be matched with a call to ImageBuffer.Unlock, so that the buffer can be used again by the control.

Sample:

This example locks and unlocks an ImageBuffer:

[C#]
ImageBuffer Buffer = ICImagingControl1.ImageBuffers[0]; Buf.Lock(); // Do a lengthy operation. Buf.Unlock();

A sample on how to use ImageBuffer and ImageBuffer.Lock is shown in Performing Advanced Image Processing.

See also: ImageBuffer, ImageBuffer.Unlock, ImageBuffer.ForceUnlock, ImageBuffer.Locked, ImageBuffer.WasLockedFlag

<< ImageAvailableEventArgs.ImageBuffer