php教程

Imagick::nextImage

(PECL imagick 2.0.0)

Imagick::nextImageMoves to the next image

说明

Imagick::nextImage ( void ) : bool

Associates the next image in the image list with an Imagick object.

返回值

成功时返回 TRUE

User Contributed Notes

markus dot s dot schmitz at gmail dot com 11-Dec-2012 10:46
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

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788