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 -- Posted via http://www.ruby-forum.com/.
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 helpYou need Rmagick http://rmagick.rubyforge.org/ -- Posted via http://www.ruby-forum.com/.
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-to-crop-image-using.html -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I do this almost daily. I use an imaging sdk found on the internet which can crop images found on the internet . Install it and it becomes a selectable processing option.Then you can crop images in any program at all, including Adobe Acrobat . Just open the images, select crop ,and follow the setps given in the sdk, the task will be finished in several seconds. if you haven''t found a good choice , you can have a try. best wishes. http://www.rasteredge.com/how-to/vb-net-imaging/crop-image/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/88c9871ae283dce6f03a186a30b1c52c%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.