コード例 #1
0
 /**
  * function will determine the size of any GIF, JPG, PNG.
  * This function uses the php Function with the same name.
  * But the php function doesn't work with some images created from some apps.
  * So this function uses the gd lib if nothing is returned from the php function
  *
  * @static
  * @public
  * @return array
  * @param $filename complete path of the image
  */
 public static function getimagesize($filename)
 {
     $arr = @getimagesize($filename);
     if (isset($arr) && is_array($arr) && count($arr) >= 4 && $arr[0] && $arr[1]) {
         return $arr;
     }
     return we_base_imageEdit::gd_version() ? we_base_imageEdit::getimagesize($filename) : $arr;
 }