Module: PhotoCook::Resize::CarrierWave
- Defined in:
- lib/photo-cook/resize/carrierwave.rb
Instance Method Summary collapse
- #resize(w, h, mode = :fit, options = {}) ⇒ Object
- #resize_inline(w, h, mode = :fit, options = {}) ⇒ Object
- #resize_to_fill(w, h, options = {}) ⇒ Object
- #resize_to_fit(w, h, options = {}) ⇒ Object
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, = {}) PhotoCook::Resize.uri(url, w, h, mode, ) 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, = {}) PhotoCook::Resize.base64_uri(url, w, h, mode, ) 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, = {}) PhotoCook::Resize.uri(url, w, h, :fill, ) 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, = {}) PhotoCook::Resize.uri(url, w, h, :fit, ) end |