HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::setImageOrientation

← setImageMatteColor   setImagePixelColor →
Sets the image orientation.

Example

//Doesn't appear to do anything
function setImageOrientation($image_path, $orientationType)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->setImageOrientation($orientationType);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}