diff --git a/src/ScaledUploads.php b/src/ScaledUploads.php index 918751d..608c17d 100644 --- a/src/ScaledUploads.php +++ b/src/ScaledUploads.php @@ -212,11 +212,11 @@ private function scaleUploadedImage($file) } /** - * exifRotation - return the exif rotation + * ExifRotation - return the exif rotation * * @param mixed $file Physical file path * - * @return int false|angle + * @return int bool */ private function exifRotation($file) { @@ -236,24 +236,6 @@ private function exifRotation($file) $ort = @$exif['Orientation']; } - switch ($ort) { - case 3: // image upside down - return '180'; - - break; - - case 6: // 90 rotate right - return '-90'; - - break; - - case 8: // 90 rotate left - return '90'; - - break; - - default: - return false; - } + return $ort > 0; } }