array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'imagick.getiteratorindex.php', 1 => 'Imagick::getIteratorIndex', 2 => 'Gets the index of the current active image', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.getinterlacescheme.php', 1 => 'Imagick::getInterlaceScheme', ), 'next' => array ( 0 => 'imagick.getnumberimages.php', 1 => 'Imagick::getNumberImages', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/getiteratorindex.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Imagick::getIteratorIndex

(PECL imagick 2, PECL imagick 3)

Imagick::getIteratorIndexGets the index of the current active image

Опис

public Imagick::getIteratorIndex(): int

Returns the index of the current active image within the Imagick object. Цей метод доступний, якщо Imagick зібраний з ImageMagick версії 6.2.9 або новішою.

Параметри

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

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

Returns an integer containing the index of the image in the stack.

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

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

Приклади

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

Create images, set and get the iterator index

<?php
$im
= new Imagick();
$im->newImage(100, 100, new ImagickPixel("red"));
$im->newImage(100, 100, new ImagickPixel("green"));
$im->newImage(100, 100, new ImagickPixel("blue"));

$im->setIteratorIndex(1);
echo
$im->getIteratorIndex();
?>

Прогляньте також