Imagick::getSize
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Imagick::getSize
Референца за `imagick.getsize.php` со подобрена типографија и навигација.
Imagick::getSize
(PECL imagick 2, PECL imagick 3)
Imagick::getSize — Returns the size associated with the Imagick object
= NULL
Get the size in pixels associated with the Imagick object, previously set by Imagick::setSize().
Забелешка:
This method just returns the size that was set using Imagick::setSize(). If you want to get the actual width / height of the image, use Imagick::getImageWidth() and Imagick::getImageHeight().
Параметри
Оваа функција нема параметри.
Вратени вредности
Returns the size associated with the Imagick object as an array with the keys "columns" and "rows".
Примери
Example #1 Getting the size of a raw RGB image set at 200x400, after scaling to 400x800 (compared to width / height)
<?php
//Set size first and then load the raw image
$img = new Imagick();
$img->setSize(200, 400);
$img->readImage("image.rgb");
$img->scaleImage(400, 800);
$size = $img->getSize();
print_r($size);
echo $img->getImageWidth()."x".$img->getImageHeight();
?>Пример #1 Пример што покажува затворачка ознака што го опфаќа последниот нов ред
Array
(
[columns] => 200
[rows] => 400
)
400x800