Joined September 2014
·

Pierre-Adrien

Altagem
·
Lyon, France
·
·
·

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
Achievements
20 Karma
0 Total ProTip Views
Interests & Skills