©
本文檔使用 php中文網手册 發布
(PECL imagick 2.0.0)
Imagick::nextImage — Moves to the next image
Associates the next image in the image list with an Imagick object.
成功时返回 TRUE
。
[#1] markus dot s dot schmitz at gmail dot com [2012-12-11 10:46:04]
Convert PDF to JPG page-wise:
<?php
$i = 0;
$imagick = new Imagick();
$imagick->readImage('myfile.pdf');
while($imagick->hasNextImage()) {
$imagick->writeImage(++$i.'-converted.jpg', false);
$imagick->nextImage();
}
?>
See also: http://php.net/manual/en/imagick.readimage.php