I am noticing that this is returning the original size of the image when it was opened, and not the size it may have been resized to with scaleImage or resizeImage.
PHP.mk документација
Imagick::getImageWidth
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Патека
imagick.getimagewidth.php
Локална патека за оваа страница.
Извор
php.net/manual/en
Оригиналниот HTML се реупотребува и локално се стилизира.
Режим
Прокси + превод во позадина
Кодовите, табелите и белешките остануваат читливи во истиот тек.
Референца
imagick.getimagewidth.php
Imagick::getImageWidth
Референца за `imagick.getimagewidth.php` со подобрена типографија и навигација.
Imagick::getImageWidth
(PECL imagick 2, PECL imagick 3)
Imagick::getImageWidth — Returns the image width
Параметри
Оваа функција нема параметри.
Вратени вредности
Ја враќа ширината на сликата.
Errors/Exceptions
Фрла ImagickException при грешка.
Белешки од корисници 3 белешки
bob at majdak dot net ¶
пред 10 години
terry ¶
12 години пред
<?php
$image = new Imagick("picture.jpg");
$width = $image->getImageWidth();
print "the image width is " . $width . " pixels";
?>
Will print:
the image width is 200 pixels
nospam dot karst at onlinq dot nl ¶
пред 10 години
"bob at majdak dot net" mentioned that this function does not return the resized image size.
I use this function in production code, and it correctly returns the width for an image resized with `resizeImage()`.
I have not tested it with `scaleImage()`.