Method: Fleximage::Operator::Base#scale_and_crop
- Defined in:
- lib/fleximage/operator/base.rb
#scale_and_crop(size, img = @image) ⇒ Object
Scale to the desired size and crop edges off to get the exact dimensions needed. Operation will happen in the main @image
unless you supply the img
argument to operate on instead.
138 139 140 |
# File 'lib/fleximage/operator/base.rb', line 138 def scale_and_crop(size, img = @image) img.crop_resized!(*size_to_xy(size)) end |