I use Paperclip to resize images as follows:
class Asset < ActiveRecord::Base has_attached_file :asset, :styles => { :thumb => "80x80#", :medium => "1280x800>" }, ...
When the size of the original image is 32x32 :
The resulting medium image is the same size (i.e. 32x32 ), but the file is a little different and the image looks a bit resized. Why is this?
As a result, the thumb size is 80x80 (it looks stretched to fit that size). How could I avoid resizing the image when it is too small. Suppose the original image dimensions are in the width and height variables.
ruby-on-rails ruby-on-rails-3 imagemagick paperclip
Misha moroshko
source share