From: Tim Hunter Date: 2008-08-27T23:27:14+09:00 Subject: Re: resizing images in rails? Ravi Katta wrote: > > > Hi, > > how to resize the images in rails app? > i want 400X300 size images to display in my app.But if user enter > 600X800 how to resize the image without effect on clarity? > > now i am using this code > > image = > Magick::Image.read("#{RAILS_ROOT}/public/gallery/#{review_img}").first > selected_image = image.crop_resized(400,400) > selected_image.write("#{RAILS_ROOT}/public/gallery/#{review_img}") > > But it extract height and width.i dont want to extract only resize > the image. > any suggestion are appreciated. > > thanks, > ravi. Here's a description of RMagick's resizing methods: http://studio.imagemagick.org/RMagick/doc/comtasks.html#thumb. Also see the section "Resizing to a maximum (or minimum) size". -- Posted via http://www.ruby-forum.com/.