ImageGear for C and C++ on Linux v18.8 - Updated
IG_mult_current_frame_is_valid
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multimedia Functions > IG_mult_current_frame_is_valid

This function lets you tell whether or not the current frame is valid.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_mult_current_frame_is_valid(
        HIGMULT hMult, 
        LPAT_BOOL lpbValid
);

Arguments:

Name Type Description
hMult HIGMULT Multimedia instance handle.
lpbValid LPAT_BOOL Boolean that is set to TRUE if the current frame is valid.

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.

Example:

 
Copy Code
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGMULT hMult;          /* Multimedia instance handle */
HIGEAR hIGear;          /* HIGEAR handle of image */
AT_BOOL bValid;         /* Is current frame valid? */
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 function in a loop over all of the frames to determine when you have advanced beyond the last available frame.