Module: CarrierWave::ImageSorcery::ClassMethods

Defined in:
lib/carrierwave-imagesorcery/image_sorcery.rb

Instance Method Summary collapse

Instance Method Details

#convert(format) ⇒ Object



8
9
10
# File 'lib/carrierwave-imagesorcery/image_sorcery.rb', line 8

def convert(format)
  process :convert => format
end

#resize_and_pad(width, height, background = :transparent, gravity = 'Center') ⇒ Object



24
25
26
# File 'lib/carrierwave-imagesorcery/image_sorcery.rb', line 24

def resize_and_pad(width, height, background=:transparent, gravity='Center')
  process :resize_and_pad => [width, height, background, gravity]
end

#resize_to_fill(width, height, gravity = 'Center') ⇒ Object



20
21
22
# File 'lib/carrierwave-imagesorcery/image_sorcery.rb', line 20

def resize_to_fill(width, height, gravity='Center')
  process :resize_to_fill => [width, height, gravity]
end

#resize_to_fit(width, height) ⇒ Object



16
17
18
# File 'lib/carrierwave-imagesorcery/image_sorcery.rb', line 16

def resize_to_fit(width, height)
  process :resize_to_fit => [width, height]
end

#resize_to_limit(width, height) ⇒ Object



12
13
14
# File 'lib/carrierwave-imagesorcery/image_sorcery.rb', line 12

def resize_to_limit(width, height)
  process :resize_to_limit => [width, height]
end