Created
May 21, 2021 15:12
-
-
Save Wilsonilo/d952868e7bd60134a92f8af15a55ae14 to your computer and use it in GitHub Desktop.
Convert PNG Screenshots to JPG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Remember to give +x with chmod. | |
#Rename in case there is space | |
#https://stackoverflow.com/questions/1806868/linux-replacing-spaces-in-the-file-names | |
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done | |
#convert to jpg | |
#https://www.cisdem.com/resource/png-to-jpg-mac.html | |
for i in *.png;do sips -s format jpeg $i --out ./$i.jpg;done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment