Absorbator Posted February 20, 2009 Share Posted February 20, 2009 Hi, I would like to resize GIF animation while keeping its frames and properties. How can I do that in PHP? Link to comment https://forums.phpfreaks.com/topic/146159-how-to-resize-gif-animation/ Share on other sites More sharing options...
The Little Guy Posted February 20, 2009 Share Posted February 20, 2009 This is your best bet: imagemagick Link to comment https://forums.phpfreaks.com/topic/146159-how-to-resize-gif-animation/#findComment-767364 Share on other sites More sharing options...
angelcool Posted February 20, 2009 Share Posted February 20, 2009 Yeah, I heard it is possible, never done it though, http://wiki.flux-cms.org/display/BLOG/Resizing+animated+GIFs+with+ImageMagick I am not familiar with this library (http://us3.php.net/imagick), so you'll be more than welcome to share your results. Angel Link to comment https://forums.phpfreaks.com/topic/146159-how-to-resize-gif-animation/#findComment-767366 Share on other sites More sharing options...
The Little Guy Posted February 20, 2009 Share Posted February 20, 2009 Here was my code: <?php shell_exec("/usr/bin/convert ~/dudeel.com/images/l_sonic.gif -coalesce -resize 50% ~/dudeel.com/images/s_sonic.gif"); ?> Here is my out put: Large: http://dudeel.com/images/l_sonic.gif 50% re-size: http://dudeel.com/images/s_sonic.gif Link to comment https://forums.phpfreaks.com/topic/146159-how-to-resize-gif-animation/#findComment-767394 Share on other sites More sharing options...
angelcool Posted February 20, 2009 Share Posted February 20, 2009 Nice!, but... /usr/bin/convert Is this an ImageMagick binary file? or just a shell script? also I wonder how to get it done through PHP's support for this library (if the functions in PHP[http://us3.php.net/imagick] are close to the binaries), I''ll guess I'll try it myself. Nice result though. Angel Link to comment https://forums.phpfreaks.com/topic/146159-how-to-resize-gif-animation/#findComment-767406 Share on other sites More sharing options...
The Little Guy Posted February 20, 2009 Share Posted February 20, 2009 That is either how ImageMagick is configured, or how my host decided to configure it on the server, IDK. Link to comment https://forums.phpfreaks.com/topic/146159-how-to-resize-gif-animation/#findComment-767408 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.