Created
January 5, 2022 08:55
-
-
Save elfacht/ccc5a0f3836a74e5561b954906b1f089 to your computer and use it in GitHub Desktop.
imagemagick CLI
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
# resize width only | |
convert input.jpg -resize 400 output.jpg | |
# resize height only | |
convert input.jpg -resize x400 output.jpg | |
# crop from center | |
convert input.jpg -gravity center -crop 200x200+0+0 +repage output.jpg | |
# convert all images to new name | |
convert *.jpg -resize 940 -set filename:new "%t_th" "%[filename:new].jpg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment