Skip to content

Instantly share code, notes, and snippets.

@yiquncode
Created December 27, 2010 10:11
Show Gist options
  • Save yiquncode/756020 to your computer and use it in GitHub Desktop.
Save yiquncode/756020 to your computer and use it in GitHub Desktop.
def resize
@mypic = User.find(current_user.id)
img = Magick::Image::read(@mypic.avatar.path).first #----> [BUG] Segmentation fault
img.crop!(::Magick::CenterGravity,20,130,276,276,true)
img.write @mypic.avatar.path(:medium)
redirect_to :action => 'pic'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment