Imagick::getIteratorIndex

(PECL imagick 2, PECL imagick 3)

Imagick::getIteratorIndexGets the index of the current active image

Beschreibung

publicImagick::getIteratorIndex(): int

Returns the index of the current active image within the Imagick object. Diese Funktion ist verfügbar, wenn Imagick gegen die ImageMagick-Version 6.2.9 oder höher kompiliert wurde.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

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

Fehler/Exceptions

Wirft ImagickException bei Fehlern.

Beispiele

Beispiel #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();
?>

Siehe auch

To Top