public function getOrientation()
{
$aspectRatio = $this->getAspectRatio(true);
if ($aspectRatio > 1) {
return ImageInterface::ORIENTATION_LANDSCAPE;
} elseif ($aspectRatio < 1) {
return ImageInterface::ORIENTATION_PORTRAIT;
} else {
return ImageInterface::ORIENTATION_SQUARE;
}
}