mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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:
parent
f7f47ffea2
commit
f6966f9078
1 changed files with 27 additions and 0 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue