Be aware that Imagick::setImageOrientation() doesn't actually rotate the image, it just changes the EXIF rotation info that will be saved with the image. In some cases that may be what you want to do, but if you're trying to rotate an image, this probably isn't the way you want to do it. The problem with relying on the EXIF rotation info is that many web browsers ignore and some image viewing software ignore the EXIF information and don't auto-rotate it automatically. This function is best used to correct EXIF rotation information just before saving an image.
To actually rotate an image, use Imagick::rotateImage().
And then maybe use this function to save the correct EXIF orientation data. For example: $image->setImageOrientation(imagick::ORIENTATION_TOPLEFT);
PHP.mk документација
Imagick::setImageOrientation
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Патека
imagick.setimageorientation.php
Локална патека за оваа страница.
Извор
php.net/manual/en
Оригиналниот HTML се реупотребува и локално се стилизира.
Режим
Прокси + превод во позадина
Кодовите, табелите и белешките остануваат читливи во истиот тек.
Референца
imagick.setimageorientation.php
Imagick::setImageOrientation
Референца за `imagick.setimageorientation.php` со подобрена типографија и навигација.
Imagick::setImageOrientation
(PECL imagick 2, PECL imagick 3)
Imagick::setImageOrientation — Sets the image orientation
Параметри
orientation-
вистинска функција, само прототип за тоа како треба да биде функцијата. orientation constants
Вратени вредности
Патеката до PHP скриптата што треба да се провери. true на успешен исход.
Примери
Пример #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();
}
?>Белешки од корисници 1 белешка
orrd101 at yahoo dot com ¶
пред 13 години