Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

How to crop an image down to a square thumbnail

View gist:3764026
1 2 3 4 5
# 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.