class BT::ResizeImage
Public Class Methods
new(width, height)
click to toggle source
# File lib/bt_image_resizer.rb, line 9 def initialize(width, height) @width = width @height = height end
Public Instance Methods
accepted_type()
click to toggle source
@return [Array<String>]
# File lib/bt_image_resizer.rb, line 19 def accepted_type %w(image/jpeg image/png) end
transform(bytes)
click to toggle source
# File lib/bt_image_resizer.rb, line 14 def transform(bytes) "gm convert -geometry #{@width}%x#{@height}% - -" << bytes end