Image Crop


#1

I want to make a program that will be able to take an image file and
crop a square at a given coordinate value (X,Y).

I would tell it the X,Y and the size of the crop ie. 350x350. The X,Y
would be the center of the newly created image.

Thanks for you help


#2

Dustin wrote:

I want to make a program that will be able to take an image file and
crop a square at a given coordinate value (X,Y).

I would tell it the X,Y and the size of the crop ie. 350x350. The X,Y
would be the center of the newly created image.

Thanks for you help

You need Rmagick http://rmagick.rubyforge.org/


#3

Alex W. wrote:

Dustin wrote:

I want to make a program that will be able to take an image file and
crop a square at a given coordinate value (X,Y).

I would tell it the X,Y and the size of the crop ie. 350x350. The X,Y
would be the center of the newly created image.

Thanks for you help

You need Rmagick http://rmagick.rubyforge.org/

Try to use the instance method crop
http://www.imagemagick.org/RMagick/doc/image1.html#crop

Try this for sample

http://genlinux.blogspot.com/2009/03/ruby-program-to-crop-image-using.html