Method: Balloon::Processing#shave
- Defined in:
- lib/balloon/processing.rb
#shave(convert, image) ⇒ Object
111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/balloon/processing.rb', line 111 def shave(convert, image) w, h = image[:width], image[:height] if w > h shave_off = ((w - h) / 2).round convert.shave "#{shave_off}x0" return end shave_off = ((h - w) / 2).round convert.shave "0x#{shave_off}" end |