Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added class methods to ImageScience module

  • Loading branch information...
commit bfe02d399c2a8e308aa608f24200793c62549c7d 1 parent ae1112b
@jnicklas jnicklas authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/carrierwave/processing/image_science.rb
View
15 lib/carrierwave/processing/image_science.rb
@@ -4,6 +4,21 @@
module CarrierWave
module ImageScience
+ extend ActiveSupport::Concern
+
+ module ClassMethods
+ def resize_to_limit(width, height)
+ process :resize_to_limit => [width, height]
+ end
+
+ def resize_to_fit(width, height)
+ process :resize_to_fit => [width, height]
+ end
+
+ def resize_to_fill(width, height)
+ process :resize_to_fill => [width, height]
+ end
+ end
##
# Resize the image to fit within the specified dimensions while retaining
Please sign in to comment.
Something went wrong with that request. Please try again.