Added information about animated gifs

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@286960 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mikko Koppanen 2009-08-09 19:04:06 +00:00
parent f7f47ffea2
commit f6966f9078

View file

@ -180,6 +180,33 @@ echo $canvas;
</mediaobject>
</example>
</para>
<para>
Working with animated GIF images
<example>
<title>Read in GIF image and resize all frames</title>
<programlisting role="php">
<![CDATA[
<?php
/* Create a new imagick object and read in GIF */
$im = new Imagick("example.gif");
/* Resize all frames */
foreach ($im as $frame) {
/* 50x50 frames */
$frame->thumbnailImage(50, 50);
/* Set the virtual canvas to correct size */
$frame->setImagePage(50, 50, 0, 0);
}
/* Notice writeImages instead of writeImage */
$im->writeImages("example_small.gif", true);
?>
]]>
</programlisting>
</example>
</para>
</section>
</chapter>