Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ $# -ne 1 ]; then
  4. echo "Usage: bash image-resizer.sh ${IMAGE_FILE}"
  5. fi
  6.  
  7. file=$1
  8. convert -resize 20x ${file} /tmp/icon-20@1x.png
  9. convert -resize 40x ${file} /tmp/icon-20@2x.png
  10. convert -resize 60x ${file} /tmp/icon-20@3x.png
  11. convert -resize 20x ${file} /tmp/icon-29@1x.png
  12. convert -resize 58x ${file} /tmp/icon-29@2x.png
  13. convert -resize 87x ${file} /tmp/icon-29@3x.png
  14. convert -resize 40x ${file} /tmp/icon-40@1x.png
  15. convert -resize 80x ${file} /tmp/icon-40@2x.png
  16. convert -resize 120x ${file} /tmp/icon-40@3x.png
  17. convert -resize 60x ${file} /tmp/icon-60@1x.png
  18. convert -resize 120x ${file} /tmp/icon-60@2x.png
  19. convert -resize 180x ${file} /tmp/icon-60@3x.png
  20. convert -resize 76x ${file} /tmp/icon-76@1x.png
  21. convert -resize 152x ${file} /tmp/icon-76@2x.png
  22. convert -resize 228x ${file} /tmp/icon-76@3x.png
  23. convert -resize 83.5x ${file} /tmp/icon-83.5@1x.png
  24. convert -resize 167x ${file} /tmp/icon-83.5@2x.png
  25. convert -resize 250.5x ${file} /tmp/icon-83.5@3x.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement