array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'imagick.getimagegeometry.php', 1 => 'Imagick::getImageGeometry', 2 => 'Gets the width and height as an associative array', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.getimagegamma.php', 1 => 'Imagick::getImageGamma', ), 'next' => array ( 0 => 'imagick.getimagegravity.php', 1 => 'Imagick::getImageGravity', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/getimagegeometry.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Imagick::getImageGeometry

(PECL imagick 2, PECL imagick 3)

Imagick::getImageGeometryGets the width and height as an associative array

Опис

public Imagick::getImageGeometry(): array

Returns the width and height as an associative array.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

Returns an array with the width/height of the image.

Помилки/виключення

Кидає ImagickException в разі помилки.

Приклади

Приклад #1 Using Imagick::getImageGeometry()

<?php
$imagick
= new Imagick();
$imagick->newImage(100, 200, "black");
print_r($imagick->getImageGeometry());
?>

Поданий вище приклад виведе:

Array
(
    [width] => 100
    [height] => 200
)