Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # _ _ __
  4. # __ _ __ _ _ __| |__ (_)/ _|_ _
  5. # / _` |/ _` | '__| '_ \| | |_| | | |
  6. #| (_| | (_| | | | |_) | | _| |_| |
  7. # \__, |\__,_|_| |_.__/|_|_| \__, |
  8. # |___/ |___/
  9. #
  10. #
  11. # Give it a filename to an image and it will turn it into zooming
  12. # garb.
  13. #
  14. # By Paul Ford in a moment of weakness
  15.  
  16. SUFFIX=jpg
  17. COLORS=32
  18. FILE=$1
  19. DELAY=20
  20. FAST=15
  21. PAUSE=100
  22. LONG_PAUSE=400
  23. GIF_NAME=`basename "$FILE" | sed -E "s/\.[A-Za-z]+$//"`.gif
  24.  
  25. convert -scale 600 "$FILE" f_000.$SUFFIX ;
  26. convert -quality 5% -gravity Center -scale 400 -extent 150% -modulate 100,0,100 f_000.$SUFFIX f_001.$SUFFIX;
  27. convert -quality 10% -gravity Center -scale 450 -extent 133% -modulate 100,40,100 f_000.$SUFFIX f_002.$SUFFIX;
  28. convert -quality 20% -gravity Center -scale 500 -extent 120% -modulate 100,80,100 f_000.$SUFFIX f_003.$SUFFIX;
  29. convert -modulate 100,200,100 f_000.$SUFFIX f_004.$SUFFIX;
  30. convert -quality 60% -modulate 100,80,150 f_000.$SUFFIX f_005.$SUFFIX;
  31.  
  32. COLORS="-colors 16 +dither -posterize 16"
  33.  
  34. convert -loop 0 \
  35. $COLORS -delay $DELAY f_001.$SUFFIX f_002.$SUFFIX f_003.$SUFFIX \
  36. $COLORS -delay $FAST f_004.$SUFFIX f_005.$SUFFIX f_004.$SUFFIX f_005.$SUFFIX \
  37. $COLORS -delay $DELAY f_004.$SUFFIX f_005.$SUFFIX \
  38. $COLORS -delay $LONG_PAUSE f_004.$SUFFIX \
  39. $COLORS -delay $DELAY f_003.$SUFFIX f_002.$SUFFIX \
  40. "$GIF_NAME";
  41.  
  42. rm f_00*.$SUFFIX;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement