Skip to content

Instantly share code, notes, and snippets.

@cgreening
Created July 1, 2021 14:41
Show Gist options
  • Save cgreening/4b6915d8a8ea4f87e9e227792bddc854 to your computer and use it in GitHub Desktop.
Save cgreening/4b6915d8a8ea4f87e9e227792bddc854 to your computer and use it in GitHub Desktop.
Quick Action for Converting Image Files to PNG or JPEG
# 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