note 90118 added to function.imagick-getnumberimages
| From: | gzabriskie at yahoo dot com | Date: | Tue, 07 Apr 2009 12:21:12 +0000 |
| Subject: | note 90118 added to function.imagick-getnumberimages | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152887@lists.php.net to get a copy of this message | ||
<?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->thumbnailImage( 400, null );
$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>
----
Server IP: 64.71.164.2
Probable Submitter: 70.158.228.210
----
Manual Page -- http://www.php.net/manual/en/function.imagick-getnumberimages.php
Edit -- https://master.php.net/note/edit/90118
Del: integrated -- https://master.php.net/note/delete/90118/integrated
Del: useless -- https://master.php.net/note/delete/90118/useless
Del: bad code -- https://master.php.net/note/delete/90118/bad+code
Del: spam -- https://master.php.net/note/delete/90118/spam
Del: non-english -- https://master.php.net/note/delete/90118/non-english
Del: in docs -- https://master.php.net/note/delete/90118/in+docs
Del: other reasons-- https://master.php.net/note/delete/90118
Reject -- https://master.php.net/note/reject/90118
Search -- https://master.php.net/manage/user-notes.php