Imagick::setImageIndex

(PECL imagick 2.0.0)

Imagick::setImageIndexSet the iterator position

설명

bool Imagick::setImageIndex ( int $index )

Set the iterator to the position in the image list specified with the index parameter.

This method has been deprecated. See Imagick::setIteratorIndex().

인수

index

The position to set the iterator to

반환값

성공시에 TRUE를 반환합니다.

오류/예외

오류시에 ImagickException이 발생합니다.

add a note add a note

User Contributed Notes 2 notes

up
2
Rob Hidalgo
12 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
-1
maulik_Vr at yahoo dot co dot in
11 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