module Sicily::Task::ResizeTask

Public Instance Methods

fit_if_photo(container_width, container_height) click to toggle source
# 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