Imagick::setImageIndex

(PECL imagick 2, PECL imagick 3)

Imagick::setImageIndexEstablece la posición del iterador

Advertencia

This function has been DEPRECATED as of Imagick 3.4.4. Relying on this function is highly discouraged.

Descripción

public Imagick::setImageIndex(int $index): bool

Establece la posición del iterador en la lista de imágenes especificada con el parámetro index.

Este método ha quedado obsoleto. Véase Imagick::setIteratorIndex().

Parámetros

index

La posición donde se va a establecer el iterador

Valores devueltos

Devuelve true en caso de éxito.

Errores/Excepciones

Lanza ImagickException en caso de error.

add a note add a note

User Contributed Notes 2 notes

up
2
Rob Hidalgo
11 years ago
When reading a PDF from an ImageBlob, and you want to set the page to be used, this is the function to use.
up
0
maulik_Vr at yahoo dot co dot in
10 years ago
when you read pdf by getImageBlog and want to get the image or blob of a specific page, use this function as below.

$ims = new Imagick();
       
$ims->readImageBlob($pdfFileContent);
       
$ims->setImageIndex(5); //this will return 6th page of the pdf file
$image->setImageFormat('png');
            //etc
$blob = $image->getImageBlob();
To Top