Imagick::setImageOrientation

(PECL imagick 2.0.0)

Imagick::setImageOrientationSets the image orientation

说锟斤拷

Imagick::setImageOrientation ( int $orientation ) : bool

Sets the image orientation.

锟斤拷锟斤拷

orientation

One of the orientation constants

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷

锟斤拷锟斤拷

Example #1 Imagick::setImageOrientation()

<?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();
}

?>