Forum: Ruby on Rails Image Crop

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dustin (Guest)
on 2006-06-13 20:42
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
Alex Wayne (Guest)
on 2006-06-13 20:59
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/
Fd8c8b4d2b026e598734508194be0653?d=identicon&s=25 Nike M. (nike)
on 2009-03-06 15:00
Alex Wayne 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-...
This topic is locked and can not be replied to.