diff --git a/reference/imagick/imagick/setimagedelay.xml b/reference/imagick/imagick/setimagedelay.xml index 33b62859ac..1239477df2 100644 --- a/reference/imagick/imagick/setimagedelay.xml +++ b/reference/imagick/imagick/setimagedelay.xml @@ -13,7 +13,12 @@ intdelay - Sets the image delay. + Sets the image delay. For an animated image this is the amount of time that + this frame of the image should be displayed for, before displaying the next + frame. + + + The delay can be set individually for each frame in an image. @@ -25,6 +30,9 @@ delay + The amount of time expressed in 'ticks' that the image should be + displayed for. For animated GIFs there are 100 ticks per second, so a + value of 20 would be 20/100 of a second aka 1/5th of a second. @@ -46,6 +54,39 @@ + + &reftitle.examples; + + + Modify animated Gif with <function>Imagick::setImageDelay</function> + +coalesceImages(); + +$frameCount = 0; + +foreach ($imagick as $frame) { + $imagick->setImageDelay((($frameCount % 11) * 5)); + $frameCount++; +} + +$imagick = $imagick->deconstructImages(); + +$imagick->writeImages("/path/to/save/output.gif", true); + +?> +]]> + + + + +