nFrames = MImgGetFrameCount( hImage )

Gets an image's total number of frames.

Number: Handle of the image

Number: Number of frames if successful or -1 if an error occurs

In this example all frames of an image are loaded:
! Load the first frame
Set hImages[0] = MImgLoadFromFile( sImagePath, MIMG_TYPE_UNKNOWN, 0 )
! Check if there are additional frames
Set nFrames = MImgGetFrameCount( hImages[0] )
! Load the additional frames into separate images
If nFrames > 1
  Set n = 1
  While n < nFrames
    Set hImages[n-1] = MImgLoadFromFile( sImagePath, MIMG_TYPE_UNKNOWN, n )
    Set n = n + 1




Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator