Created
December 9, 2015 13:56
-
-
Save mwender/8c59587b409453ca71e7 to your computer and use it in GitHub Desktop.
Resize images of a specified size and file type.
This file contains hidden or 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
# Credit: http://unix.stackexchange.com/questions/38943/use-mogrify-to-resize-large-files-while-ignoring-small-ones | |
identify -format '%w %h %i\n' ./*.jpg | | |
awk '$1 > 1200 || $2 > 1200 {sub(/^[^ ]* [^ ]* /, ""); print}' | | |
tr '\n' '\0' | | |
xargs -0 mogrify -quality 55 -resize '1200x1200' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment