hi in my application i have a photo gallery page where i showing all my album photos, i want to developed a functionality where i can rotate photo there and and saved backed to file system. how it is possible ? -- 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 -~----------~----~----~----~------~----~------~--~---
RMagick can do this: http://rmagick.rubyforge.org/ -- 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 -~----------~----~----~----~------~----~------~--~---
Thorsten Mueller wrote:> RMagick can do this: > http://rmagick.rubyforge.org/please send me some clues i haven''t understood from rmagic documentation. -- 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 -~----------~----~----~----~------~----~------~--~---
On May 12, 6:13 am, Sunny Bogawat <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hi in my application i have a photo gallery page where i showing all my > album photos, i want to developed a functionality where i can rotate > photo there and and saved backed to file system. > how it is possible ? > -- > Posted viahttp://www.ruby-forum.com/.Untested sample code, compressed to a one-liner to get to the essentials: Magick::Image.read("/path/to/file/to/rotate").first.rotate! (90).write("/path/to/rotated/file") Breakdown and explanation: Magick::Image.read("/path/to/your/file") - -Read in file .first -select first layer (unless you are dealing with animated GIF''s or something, this is usually the only one) .rotate!(90) - I''ll let you guess. Note, unlike regular math, positive angles mean clockwise, not counter-clockwise. Note also the bang, which means to modify the object in-place, not return a new one, which is why we can chain these calls in one line. .write("") - Write the new image out. After doing "Magick::Image.read("/path/to/your/file").first" you have an Image object, which is where all the work gets done. I think you can follow the API from there, as once you know how to get an Image object, all the methods are right there. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---