Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
crop image with RMagick
require 'RMagick'
original = Magick::Image.read('original.jpg').first
image = original.crop(0, 0, 10, 10)
image.write('cropped.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment