src/UI/Image.php
public static function isAnimated( $filePath ){
		$content	= file_get_contents( $filePath );
		$pos1		= 0;
		$count		= 0;
		while( $count < 2 ) # There is no point in continuing after we find a 2nd frame
		{
			$pos1	= strpos( $content, "\x00\x21\xF9\x04", $pos1 );
			if( $pos1 === FALSE )
				break;
			$pos2	= strpos( $content, "\x00\x2C", $pos1 );
			if( $pos2 === FALSE )
				break;
			else if( $pos1 + 8 == $pos2 )
				$count++;
			$pos1 = $pos2;
		}
		return $count > 1;
	}
public static function isAnimated( $filePath ){
		$content	= file_get_contents( $filePath );
		$pos1		= 0;
		$count		= 0;
		while( $count < 2 ) # There is no point in continuing after we find a 2nd frame
		{
			$pos1	= strpos( $content, "\x00\x21\xF9\x04", $pos1 );
			if( $pos1 === FALSE )
				break;
			$pos2	= strpos( $content, "\x00\x2C", $pos1 );
			if( $pos2 === FALSE )
				break;
			else if( $pos1 + 8 == $pos2 )
				$count++;
			$pos1 = $pos2;
		}
		return $count > 1;
	}
public static function isAnimated ( $ filePath ) { $ content = file_get_contents ( $ filePath ) ; $ pos1 = 0 ; $ count = 0 ; while ( $ count < 2 ) # There is no point in continuing after we find a 2nd frame { $ pos1 = strpos ( $ content , "\x00\x21\xF9\x04" , $ pos1 ) ; if ( $ pos1 === FALSE ) break ; $ pos2 = strpos ( $ content , "\x00\x2C" , $ pos1 ) ; if ( $ pos2 === FALSE ) break ; else if ( $ pos1 + 8 == $ pos2 ) $ count ++ ; $ pos1 = $ pos2 ; } return $ count > 1 ; }
Indicates whether an Image File is an animated GIF.
@access		public
@static
@param		string		$filePath	Path Name of Image File
@return		boolean		TRUE if Image File is an animated GIF
Indicates whether an Image File is an animated GIF .