Module: PhotoCook::Resize::CarrierWave

Defined in:
lib/photo-cook/resize/carrierwave.rb

Instance Method Summary collapse

Instance Method Details

#resize(w, h, mode = :fit, options = {}) ⇒ Object



7
8
9
# File 'lib/photo-cook/resize/carrierwave.rb', line 7

def resize(w, h, mode = :fit, options = {})
  PhotoCook::Resize.uri(url, w, h, mode, options)
end

#resize_inline(w, h, mode = :fit, options = {}) ⇒ Object



19
20
21
# File 'lib/photo-cook/resize/carrierwave.rb', line 19

def resize_inline(w, h, mode = :fit, options = {})
  PhotoCook::Resize.base64_uri(url, w, h, mode, options)
end

#resize_to_fill(w, h, options = {}) ⇒ Object



15
16
17
# File 'lib/photo-cook/resize/carrierwave.rb', line 15

def resize_to_fill(w, h, options = {})
  PhotoCook::Resize.uri(url, w, h, :fill, options)
end

#resize_to_fit(w, h, options = {}) ⇒ Object



11
12
13
# File 'lib/photo-cook/resize/carrierwave.rb', line 11

def resize_to_fit(w, h, options = {})
  PhotoCook::Resize.uri(url, w, h, :fit, options)
end