ImageGear Professional DLL v17.1 for Windows Accusoft
IG_mult_frame_duration_get
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multimedia Functions > IG_mult_frame_duration_get

Glossary Item Box

This function returns the duration of the given frame in 100 nanosecond units.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_mult_frame_duration_get(
        HIGMULT hMult,
        AT_UINT frameNum,
        LPAT_UINT lpDuration
);

Arguments:

hMult Multimedia instance handle.
frameNum Frame number to get duration of (0 = first frame).
lpDuration Frame duration (in 100ns units).

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

Media Player

Example:

  Copy Code
/* Retrieve duration of first frame */
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGMULT hMult;          /* Multimedia instance handle */
AT_UINT duration;       /* Duration of frame in 100ns units */
nErrcount = IG_mult_frame_duration_get(hMult, 0, &duration);

Remarks:

This provides a reasonable level of accuracy for the short frame durations that are typical in video. To convert to milliseconds, divide by 10000.

Note that retrieving the durations of individual frames is essential for proper timing when the frame rate is variable, as is often the case with animated GIF files.

©2012. Accusoft Corporation. All Rights Reserved.