Hi, would anyone have any advices on the next? I allow users to upload images to my app. I''m using attachment_fu and MiniMagick. There''s two things that I''d like to do: 1- No matter what format the original file is I''d like to save it in jgp format. 2- I want to keep all images limited to say 1000px width, so resize if they are bigger. Is there a way to do that without much hassle? Thanks. -- 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 -~----------~----~----~----~------~----~------~--~---
Resizing is a basic feature, take a look at the README. Format transformation, on the other hand, is more difficult and is not a known feature of attachemnt_fu... Cheers, Sazima On Jan 19, 5:51 am, comopasta Gr <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, would anyone have any advices on the next? > > I allow users to upload images to my app. I''m using attachment_fu and > MiniMagick. > There''s two things that I''d like to do: > > 1- No matter what format the original file is I''d like to save it in jgp > format. > 2- I want to keep all images limited to say 1000px width, so resize if > they are bigger. > > Is there a way to do that without much hassle? > > Thanks. > -- > Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Here''s an example of how to do what you want with Rmagick (probably works in principle with mini magick, but not sure): http://github.com/kete/kete/blob/3ae3c179f86943ccccaf5a15d8b5590a28c0ae6e/lib/resize_as_jpeg_when_necessary.rb It''s a module we mix in to monkey patch (i.e. redefine methods locally) attachment_fu''s built in processor code for Rmagick in the Kete app ( http://kete.net.nz). Cheers, Walter --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, thanks for the comments! This is a great piece of information. Regards. -- 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 -~----------~----~----~----~------~----~------~--~---