convert.sh 973 B

12345678910111213141516171819
  1. #! /bin/bash
  2. # convert to white png
  3. for img in fond-theme-?.png; do convert "$img" -background white -alpha remove "${img%.png}"-flat.png; done
  4. # convert from png to jpg
  5. for img in fond-theme-?-flat.png; do convert "$img" "${img%.png}".jpg; done
  6. # create menu thumbnails
  7. for img in fond-theme-?-flat.png; do convert "$img" -resize 100 menu-"${img%.png}".jpg; done
  8. for img in fond-theme-?-flat.png; do convert "$img" -resize 100 menu-"${img}"; done
  9. # convert to n&b
  10. for img in fond-theme-?-flat.png; do convert "$img" -set colorspace Gray -separate -average "${img%.png}"-nb.jpg; done
  11. for img in fond-theme-?-flat.png; do convert "$img" -set colorspace Gray -separate -average "${img%.png}"-nb.png; done
  12. # convert to n&b
  13. for img in menu-fond-theme-?-flat.png; do convert "$img" -set colorspace Gray -separate -average "${img%.png}"-nb.jpg; done
  14. for img in menu-fond-theme-?-flat.png; do convert "$img" -set colorspace Gray -separate -average "${img%.png}"-nb.png; done