Created
July 1, 2021 14:41
-
-
Save cgreening/4b6915d8a8ea4f87e9e227792bddc854 to your computer and use it in GitHub Desktop.
Quick Action for Converting Image Files to PNG or JPEG
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
# See here for details - https://youtu.be/Sfr0OQuZbA4 | |
# Make sure the image magick tools are in the path | |
export PATH=/usr/local/bin/:$PATH | |
# iterate through each file - make sure you selected: Pass Input "As Arguments" | |
for f in "$@" | |
do | |
# use mogrify to convert to JPEG - change to PNG for PNG conversion | |
mogrify -format jpeg "$f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment