lib/carrierwave/processing/rmagick.rb in carrierwave-0.4.0 vs lib/carrierwave/processing/rmagick.rb in carrierwave-0.4.1
- old
+ new
@@ -3,10 +3,12 @@
unless defined? Magick
begin
require 'rmagick'
rescue LoadError
require 'RMagick'
+ rescue LoadError
+ puts "WARNING: Failed to require rmagick, image processing may fail!"
end
end
module CarrierWave
@@ -173,12 +175,10 @@
img = yield(img) if block_given?
img
end
end
- alias_method :resize, :resize_to_fit
-
##
# From the RMagick documentation: "Resize the image to fit within the
# specified dimensions while retaining the aspect ratio of the original
# image. If necessary, crop the image in the larger dimension."
#
@@ -198,11 +198,9 @@
img.crop_resized!(width, height)
img = yield(img) if block_given?
img
end
end
-
- alias_method :crop_resized, :resize_to_fill
##
# Resize the image to fit within the specified dimensions while retaining
# the original aspect ratio. If necessary, will pad the remaining area
# with the given color, which defaults to transparent (for gif and png,