private function getOrientation($filename) {
        $exif = @exif_read_data($filename);
        if($exif === null)
            return 0;
        $rotation = 0;
        if (!empty($exif['Orientation'])) {
            switch ($exif['Orientation']) {
                case 3:
                    $rotation = 180;
                    break;
                case 6:
                    $rotation = 90;
                    break;
                case 8:
                    $rotation = -90;
                    break;
            }
        }
        return $rotation;
    }
private function getOrientation($filename) {
        $exif = @exif_read_data($filename);
        if($exif === null)
            return 0;
        $rotation = 0;
        if (!empty($exif['Orientation'])) {
            switch ($exif['Orientation']) {
                case 3:
                    $rotation = 180;
                    break;
                case 6:
                    $rotation = 90;
                    break;
                case 8:
                    $rotation = -90;
                    break;
            }
        }
        return $rotation;
    }
private function getOrientation ( $ filename ) { $ exif = @ exif_read_data ( $ filename ) ; if ( $ exif === null ) return 0 ; $ rotation = 0 ; if ( ! empty ( $ exif [ 'Orientation' ] ) ) { switch ( $ exif [ 'Orientation' ] ) { case 3 : $ rotation = 180 ; break ; case 6 : $ rotation = 90 ; break ; case 8 : $ rotation = - 90 ; break ; } } return $ rotation ; }
Return the orientation of an image
@param type $filename
@return int
Return the orientation of an image