Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
How to crop an image down to a square thumbnail
# 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
Something went wrong with that request. Please try again.