Created
September 21, 2012 21:28
-
-
Save kuinak/3764026 to your computer and use it in GitHub Desktop.
How to crop an image down to a square thumbnail
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
# takes image and fits to a square, cutting off edges | |
convert original.jpg -thumbnail 150x150^ -gravity Center -extent 150x150 new.jpg | |
# takes image and fits to a square, specified by bounds | |
convert -extract 200x200+250+0 -thumbnail 150x150^ -extent 150x150 -strip original.jpg new.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment