Last active
September 1, 2017 11:53
-
-
Save Mad182/169af152c7f8c720a3f8 to your computer and use it in GitHub Desktop.
gif resize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//coalesce and resize as seen on https://ezgif.com/resize | |
exec(CONVERT . " '" . IMG_PATH . "/tmp/" . $file . "' -coalesce '" . IMG_PATH . "/tmp/coalesce_" . $file . "'"); | |
exec(CONVERT . " -size " . $imsize[0] . "x" . $imsize[1] . " '" . IMG_PATH . "/tmp/coalesce_" . $file . "' -resize " . $width . "x" . $height . " '" . IMG_PATH . "/tmp/nonopt_" . $out . "'"); | |
//compress to save bandwidth | |
exec(GIFSICLE . " -O3 --lossy=30 '" . IMG_PATH . "/tmp/nonopt_" . $out . "' >'" . IMG_PATH . "/tmp/" . $out . "'"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment