Thanks a lot, it helped me much for a project I'm currently working on. Here's what I came up with, using MiniMagick, in case it can help anyone.
protected def process_original_version image = ::MiniMagick::Image::read(File.binread(@file.file)) if image[:width] > image[:height] resize_to_fill 1600, 1200 else resize_to_fill 1200, 1600 end end
Thanks a lot, it helped me much for a project I'm currently working on. Here's what I came up with, using MiniMagick, in case it can help anyone.