public function reorient(bool $silent = false)
	{
		$orientation = $this->getEXIF('Orientation', $silent);

		switch ($orientation)
		{
			case 2:
				return $this->flip('horizontal');
				break;
			case 3:
				return $this->rotate(180);
				break;
			case 4:
				return $this->rotate(180)
								->flip('horizontal');
				break;
			case 5:
				return $this->rotate(270)
								->flip('horizontal');
				break;
			case 6:
				return $this->rotate(270);
				break;
			case 7:
				return $this->rotate(90)
								->flip('horizontal');
				break;
			case 8:
				return $this->rotate(90);
				break;
			default:
				return $this;
		}
	}
public function reorient(bool $silent = false)
	{
		$orientation = $this->getEXIF('Orientation', $silent);

		switch ($orientation)
		{
			case 2:
				return $this->flip('horizontal');
				break;
			case 3:
				return $this->rotate(180);
				break;
			case 4:
				return $this->rotate(180)
								->flip('horizontal');
				break;
			case 5:
				return $this->rotate(270)
								->flip('horizontal');
				break;
			case 6:
				return $this->rotate(270);
				break;
			case 7:
				return $this->rotate(90)
								->flip('horizontal');
				break;
			case 8:
				return $this->rotate(90);
				break;
			default:
				return $this;
		}
	}
public function reorient ( bool $ silent = false ) { $ orientation = $ this -> getEXIF ( 'Orientation' , $ silent ) ; switch ( $ orientation ) { case 2 : return $ this -> flip ( 'horizontal' ) ; break ; case 3 : return $ this -> rotate ( 180 ) ; break ; case 4 : return $ this -> rotate ( 180 ) -> flip ( 'horizontal' ) ; break ; case 5 : return $ this -> rotate ( 270 ) -> flip ( 'horizontal' ) ; break ; case 6 : return $ this -> rotate ( 270 ) ; break ; case 7 : return $ this -> rotate ( 90 ) -> flip ( 'horizontal' ) ; break ; case 8 : return $ this -> rotate ( 90 ) ; break ; default : return $ this ; } }
Reads the EXIF information from the image and modifies the orientation
so that displays correctly in the browser. This is especially an issue
with images taken by smartphones who always store the image up-right,
but set the orientation flag to display it correctly.

@param boolean $silent If true, will ignore exceptions when PHP doesn't support EXIF.

@return $this
Reads the EXIF information from the image and modifies the orientation so that displays correctly in the browser . This is especially an issue with images taken by smartphones who always store the image up - right but set the orientation flag to display it correctly .