Guest User

Untitled

a guest
Jul 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. # Pass image as first param
  4. IMAGE=$1
  5.  
  6. # Declare array
  7. declare -a color=("rgb(66,0,69)" "rgb(0,137,60)" "rgb(0,118,137)" "rgb(14,0,49)" "rgb(200,76,23)")
  8.  
  9. # For each color, create a recolored version of the all black template
  10. for i in "${!color[@]}"; do
  11. printf "Creating image %s\t%s\n" "$i" "${color[$i]}"
  12. convert $IMAGE -fuzz 75% -fill "${color[$i]}" -opaque black "output_$i.png"
  13. done
  14.  
  15. # Turn it into a gif
  16. convert -loop 0 -delay 10 output_[0-$((${#color[@]} - 1))].png output.gif
Add Comment
Please, Sign In to add comment