isPng() 공개 정적인 메소드

public static isPng ( string $format ) : boolean
$format string
리턴 boolean
예제 #1
0
파일: Image.php 프로젝트: JBZoo/Image
 /**
  * Create image resource
  *
  * @param string $format
  * @return resource
  *
  * @throws Exception
  */
 protected function _imageCreate($format)
 {
     if (Helper::isJpeg($format)) {
         $result = imagecreatefromjpeg($this->_filename);
     } elseif (Helper::isPng($format)) {
         $result = imagecreatefrompng($this->_filename);
     } elseif (Helper::isGif($format)) {
         $result = imagecreatefromgif($this->_filename);
     } else {
         throw new Exception('Invalid image: ' . $this->_filename);
         // @codeCoverageIgnore
     }
     return $result;
 }