Skip to content

Instantly share code, notes, and snippets.

Created February 18, 2013 18:25
Show Gist options
  • Save anonymous/4979459 to your computer and use it in GitHub Desktop.
Save anonymous/4979459 to your computer and use it in GitHub Desktop.
Translate a thumbnail into a rounded thumbnail. Basically this: http://stackoverflow.com/questions/11233887/cut-circle-out-of-image-with-rmagick but this implementation wasn't working as expected. Instead of a rounded image, i would receive an image with a miscellaneous black circle in the corner.
# System command.
# convert original.image.png -resize '168x168^' -gravity center -crop '168x168+0+0' original.resize.png;
# convert -size 168x168 xc: -fill original.resize.png -draw 'circle 75,75 25,1' thumbnail.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment