src/ImageCompare.php
private function createImage($path) {
		$mime = $this->mimeType($path);
      
		if ($mime[2] == 'jpg') {
			return imagecreatefromjpeg ($path);
		} else if ($mime[2] == 'png') {
			return imagecreatefrompng ($path);
		} else {
			return false; 
		} 
    }
private function createImage($path) {
		$mime = $this->mimeType($path);
      
		if ($mime[2] == 'jpg') {
			return imagecreatefromjpeg ($path);
		} else if ($mime[2] == 'png') {
			return imagecreatefrompng ($path);
		} else {
			return false; 
		} 
    }
private function createImage ( $ path ) { $ mime = $ this -> mimeType ( $ path ) ; if ( $ mime [ 2 ] == 'jpg' ) { return imagecreatefromjpeg ( $ path ) ; } else if ( $ mime [ 2 ] == 'png' ) { return imagecreatefrompng ( $ path ) ; } else { return false ; } }
Returns image resource or false if it's not jpg or png

@param string $path Path to image

@return bool|resource
Returns image resource or false if it s not jpg or png