Skip to content

Instantly share code, notes, and snippets.

@benbonnet
Created May 2, 2009 21:58
Show Gist options
  • Save benbonnet/105726 to your computer and use it in GitHub Desktop.
Save benbonnet/105726 to your computer and use it in GitHub Desktop.
require 'RMagick'
clown = Magick::ImageList.new("clown.jpg")
face = clown.crop(50, 15, 150, 165)
white_bg = Magick::Image.new(clown.columns, clown.rows)
clown = white_bg.composite(face, 50, 15,
Magick::OverCompositeOp)
clown.write('crop.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment