Skip to content

Instantly share code, notes, and snippets.

@Fintan
Last active June 15, 2022 08:10
Show Gist options
  • Save Fintan/b2d98f7eb0aec5745a105055d033e857 to your computer and use it in GitHub Desktop.
Save Fintan/b2d98f7eb0aec5745a105055d033e857 to your computer and use it in GitHub Desktop.
Use Imagemagick to resize and set quality of all jpegs in a directory, copying to a sub-directory (xyz)
magick mogrify -path xyz -quality 82 -resize 512x512 *.jpg
# convert png to jpg
for image in *.png ; do convert "$image" "${image%.*}.jpg" ; done
# https://www.opensourcefeed.org/00-convert-png-to-jpg-imagemagick/
@Fintan
Copy link
Author

Fintan commented Oct 10, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment