Created
May 8, 2018 08:30
-
-
Save bordeo/5ec53fae272c0888291f10df7b909f0a to your computer and use it in GitHub Desktop.
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 | |
FOLDER_TO_CONVERT=$1 | |
FOLDER_TO_SAVE=$2 | |
for filename in $FOLDER_TO_CONVERT/*.jpg; do | |
basename="$(basename "$filename" .jpg)" | |
convert "$FOLDER_TO_CONVERT/$basename.jpg" -sampling-factor 4:2:0 -strip -quality 80 -interlace JPEG -colorspace sRGB "$FOLDER_TO_SAVE/$basename.jpg" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment