Example #1
0
 public function get_image_size($file_path, $auto_orient = TRUE)
 {
     list($img_width, $img_height) = parent::get_image_size($file_path);
     if ($auto_orient && function_exists('exif_read_data') && ($exif = @exif_read_data($file_path)) && (int) @$exif['Orientation'] >= 5) {
         $tmp = $img_width;
         $img_width = $img_height;
         $img_height = $tmp;
         unset($tmp);
     }
     return array($img_width, $img_height);
 }