ImageGear for C and C++ on Windows v19.8 - Updated
IG_mult_current_frame_advance
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multimedia Functions > IG_mult_current_frame_advance

This function advances the current frame to the next frame.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_mult_current_frame_advance(HIGMULT hMult);

Arguments:

Name Type Description
hMult HIGMULT Multimedia instance handle.

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
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGMULT hMult;          /* Multimedia instance handle */
AT_BOOL bValid;         /* Is current frame valid? */
HIGEAR hIGear;          /* HIGEAR handle of image */
while (IG_mult_current_frame_is_valid(hMult, &bValid) == IGE_SUCCESS && bValid)
{
        nErrcount = IG_mult_current_frame_image_get(hMult, &hIGear);
        nErrcount = IG_mult_current_frame_advance(hMult);
}

Remarks:

You can use this in a loop to iterate over all of the frames. This function will not generate an error when you advance beyond the last available frame. You should use IG_mult_current_frame_is_valid() to determine whether or not the end has been reached.