Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>if you have imagemagick access, you can do this:</p> <pre><code>system("convert big.gif -coalesce coalesce.gif"); system("convert -size 200x100 coalesce.gif -resize 200x10 small.gif"); </code></pre> <p>this is most likely possible with the imagemagick plugin if you don't have system() access</p> <p>NOTE: this may create a larger filesize though a smaller dimensions image due to coalescing essentially deoptimizing the image.</p> <p><strong>UPDATE:</strong> If you don't have ImageMagick access, you should be able to use a combination of the following steps to resize an animated gif (assuming you have GD access):</p> <ol> <li>Detect if the image is an animated gif: <a href="https://stackoverflow.com/questions/280658/can-i-detect-animated-gifs-using-php-and-gd">Can I detect animated gifs using php and gd?</a> (top answer)</li> <li>Split the animated gif into individual frames: <a href="http://www.phpclasses.org/package/3234-PHP-Split-GIF-animations-into-multiple-images.html" rel="nofollow noreferrer">http://www.phpclasses.org/package/3234-PHP-Split-GIF-animations-into-multiple-images.html</a></li> <li>Resize the individual frames: <a href="http://www.akemapa.com/2008/07/10/php-gd-resize-transparent-image-png-gif/" rel="nofollow noreferrer">http://www.akemapa.com/2008/07/10/php-gd-resize-transparent-image-png-gif/</a></li> <li>Recomposite the frames into an animated gif again: <a href="http://www.phpclasses.org/package/3163-PHP-Generate-GIF-animations-from-a-set-of-GIF-images.html" rel="nofollow noreferrer">http://www.phpclasses.org/package/3163-PHP-Generate-GIF-animations-from-a-set-of-GIF-images.html</a></li> </ol> <p>This is definitely much more intensive than the ImageMagick route, but it should be technically possible.</p> <p>If you get it working, please share with the world!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload