Imagick::getNumberImages

(No version information available, might be only in CVS)

Imagick::getNumberImages — Returns the number of images in the object

Описание

int Imagick::getNumberImages ( void )
Внимание

К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.

Returns the number of images associated with Imagick object.

Возвращаемые значения

Returns the number of images associated with Imagick object, throwing ImagickException on failure.

Коментарии

<?php
/* Create the object */
$image = new Imagick('YourImageLocation.tif');
$count $image->getNumberImages();

echo 
"<h3 style=\"font: bold 12pt Arial\">Total Number of Images Extracted ".
     
"from the TIF : ".$image->getNumberImages()."</h3>";

for (
$x 1;$x <= $image->getNumberImages(); $x++) {
 
$image->previousImage();
 
$image->thumbnailImage400null );
 
$image->writeImage('img'.$count.'.png');
 
$count--;
}
?>

<html>
  <head>
    <title>Extracting Images Form TIFF</title>
  </head>
  <body>
    <table cellspacing="10" style="background: #ddd"><tr>
      <?php
     
for ($x 1;$x <= $image->getNumberImages(); $x++) {
        echo 
"<td><img src=\"img$x.png\"<br /><p style=\"font: bold 12pt Arial;".
             
"text-align: center\">image $x (png)</p></td>";
      }
     
?>
    </tr></table>
  </body>
</html>
2009-04-07 15:21:12
http://php5.kiev.ua/manual/ru/function.imagick-getnumberimages.html

    Поддержать сайт на родительском проекте КГБ