Module: Sicily::Task::ResizeTask

Defined in:
lib/sicily/task/resize_task.rb

Instance Method Summary collapse

Instance Method Details

#fit_if_photo(container_width, container_height) ⇒ Object



9
10
11
12
13
14
# File 'lib/sicily/task/resize_task.rb', line 9

def fit_if_photo(container_width, container_height)
  info "fit_if_photo to #{container_width}x#{container_height}"
  MiniMagick::Image.new(@path) do |image|
    image.resize "#{container_width}x#{container_height}>"
  end
end