forked from leftypol/leftypol
Exif.php: add exifOrientationOnSide
This commit is contained in:
parent
5e503af1e9
commit
72fcf970c3
1 changed files with 10 additions and 0 deletions
|
@ -11,4 +11,14 @@ class Exif {
|
|||
public const EXIF_ORIENTATION_270_UPRIGHT = 7;
|
||||
public const EXIF_ORIENTATION_270_FLIPPED = 8;
|
||||
public const EXIF_ORIENTATION_UNDEFINED = 9;
|
||||
|
||||
/**
|
||||
* Should you switch width and height since the image is on the side?
|
||||
*
|
||||
* @param int $exif_orientation An EXIF_ORIENTATION_* constant.
|
||||
* @return boolean
|
||||
*/
|
||||
public static function exifOrientationOnSide(int $exif_orientation): bool {
|
||||
return $exif_orientation >= 5 && $exif_orientation <= 8;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue