Imagick::setImageOrientation
PHP function
Edit on GitHub ✎
(PECL imagick 2, PECL imagick 3)
Sets the image orientation
Description
Imagick::setImageOrientation(int $orientation): bool
Sets the image orientation.
Parameters
orientationOne of the orientation constants
Return Values
Success
Examples
Imagick::setImageOrientation()
php
<?php
//Doesn't appear to do anything
function setImageOrientation($imagePath, $orientationType) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->setImageOrientation($orientationType);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>