コード例 #1
0
ファイル: File.php プロジェクト: laiello/oops-project
 public function _stat()
 {
     parent::_stat();
     if (($info = getimagesize($this->_filename)) === false) {
         throw new Oops_Image_Exception("Invalid image file {$this->_filename}");
     }
     $this->_width = $info[0];
     $this->_height = $info[1];
     $this->_orient = 1;
     if (function_exists('exif_read_data')) {
         $exifData = @exif_read_data($this->_filename);
         if (sizeof($exifData) && isset($exifData['Orientation'])) {
             $this->_orient = $exifData['Orientation'];
         }
     }
 }