Skip to content

Determining the Frame Number Using the Framegrabber API#

In earlier versions of the Framegrabber API, the Fg_getImageEx() callback function returned the frame number in blocking mode. This was prone to error and has been fixed in Framegrabber SDK version 5.9.0. Now, the buffer number is returned instead.

For backwards compatibility, you can use FG_APC_OLD_ACQ_BLOCK_BEHAVIOR and call Fg_getImageEx() from the callback handler. However, this isn't recommended and should only be used if absolutely necessary.

To determine the frame number, use the Fg_getParameterEx() function with the new FG_IMAGE_NUMBER parameter identifier.

See also the Runtime 5.9.0 Release Notes and footnote c in the fglib5 documentation.

Back to Knowledge Articles