public function getFrame($frameNumber = null, $width = null, $height = null, $quality = null)
    {
        $framePos = ($frameNumber === null) ? $this->frameNumber : (((int)$frameNumber) - 1);

        // Frame position out of range
        if (!is_numeric($framePos) || $framePos < 0 || $framePos > $this->getFrameCount()) {
            return false;
        }

        $frameTime = round(($framePos / $this->getFrameCount()) * $this->getDuration(), 4);

        $frame = $this->getFrameAtTime($frameTime, $width, $height, $quality);

        // Increment internal frame number
        if ($frameNumber === null) {
            ++$this->frameNumber;
        }

        return $frame;
    }
public function getFrame($frameNumber = null, $width = null, $height = null, $quality = null)
    {
        $framePos = ($frameNumber === null) ? $this->frameNumber : (((int)$frameNumber) - 1);

        // Frame position out of range
        if (!is_numeric($framePos) || $framePos < 0 || $framePos > $this->getFrameCount()) {
            return false;
        }

        $frameTime = round(($framePos / $this->getFrameCount()) * $this->getDuration(), 4);

        $frame = $this->getFrameAtTime($frameTime, $width, $height, $quality);

        // Increment internal frame number
        if ($frameNumber === null) {
            ++$this->frameNumber;
        }

        return $frame;
    }
public function getFrame ( $ frameNumber = null , $ width = null , $ height = null , $ quality = null ) { $ framePos = ( $ frameNumber === null ) ? $ this -> frameNumber : ( ( ( int ) $ frameNumber ) - 1 ) ; // Frame position out of range if ( ! is_numeric ( $ framePos ) || $ framePos < 0 || $ framePos > $ this -> getFrameCount ( ) ) { return false ; } $ frameTime = round ( ( $ framePos / $ this -> getFrameCount ( ) ) * $ this -> getDuration ( ) , 4 ) ; $ frame = $ this -> getFrameAtTime ( $ frameTime , $ width , $ height , $ quality ) ; // Increment internal frame number if ( $ frameNumber === null ) { ++ $ this -> frameNumber ; } return $ frame ; }
Returns a frame from the movie as an Frame object. Returns false if the frame was not found.

@param int $frameNumber Frame from the movie to return. If no frame number is specified,
returns the next frame of the movie.
@param int $width
@param int $height
@param int $quality

@return Frame|boolean
Returns a frame from the movie as an Frame object . Returns false if the frame was not found .