Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function png2jpeg() {
- echo 'Warning this command wil convert all png in jpeg recursively and delete png files'
- echo "Do you wish to Continue?"
- select yn in "Yes" "No"; do
- case $yn in
- Yes )
- for f in `find . -name "*.png"`
- do
- alpha=$(identify -format %A $f)
- if [ "$alpha" == 'False' ]
- then
- convert $f ${f/.png/.jpg}
- rm $f
- fi
- done
- break;;
- No )
- exit;;
- esac
- done
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement