文字

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。

用户评论:

[#1] maulik_Vr at yahoo dot co dot in [2013-04-22 07:37:06]

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();

[#2] Rob Hidalgo [2012-10-09 05:05:54]

When reading a PDF from an ImageBlob, and you want to set the page to be used, this is the function to use.

上一篇: 下一篇: