├── .gitignore ├── panic-party.gif ├── README.md └── party-gif.sh /.gitignore: -------------------------------------------------------------------------------- 1 | */ 2 | party_final_* 3 | .DS_store 4 | party_mod* 5 | -------------------------------------------------------------------------------- /panic-party.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/casalefornia/party-gif/HEAD/panic-party.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # party-gif 2 | ez party gifs for ur slack emoji culture needs 3 | 4 | ![panic-party.gif](panic-party.gif) 5 | 6 | ## how to 7 | this script currently only works on mac (uses brew to install ImageMagick) 8 | 9 | first, install brew: 10 | 11 | ```/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"``` 12 | 13 | then, use this command to make the gif: 14 | 15 | `sh party-gif.sh [IMG_LOCATION]` -------------------------------------------------------------------------------- /party-gif.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Static image to party gif conversion script 3 | 4 | # Install dependencies if necessary 5 | if brew ls --versions ImageMagick > /dev/null; then 6 | # imagemagick is installed 7 | echo ImageMagick is installed 8 | else 9 | # imagemagick is not installed 10 | brew install ImageMagick 11 | fi 12 | 13 | # User input for color change rate 14 | echo "Enter color change rate (10-50): " 15 | read COLOR_CHANGE_RATE 16 | 17 | # Convert original image into several color frames 18 | for ((i=0; i <= 200 ; i++)) 19 | do 20 | if ! ((i % $COLOR_CHANGE_RATE)); then 21 | convert $1 -modulate 100,100,$i party_mod_`printf "%03d" $i`.gif 22 | fi 23 | done 24 | 25 | # Add frames to one image, then save final copy 26 | convert -delay 10 party_mod_*.gif -loop 0 party_final_`date '+%Y-%m-%d_%H-%M-%S'`.gif 27 | 28 | # Notify user of saved image 29 | echo Saved: party_`date '+%Y-%m-%d_%H-%M-%S'`.gif 30 | 31 | # Cleanup the frames 32 | rm party_mod_*.gif --------------------------------------------------------------------------------