Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
crop_resized and resize aliases removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicklas committed Oct 15, 2009
1 parent 05f94d0 commit 3e024c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions History.txt
Expand Up @@ -3,8 +3,7 @@
* [changed] Major changes to the ImageScience module, it actually works now!

* [removed] Support for Sequel < 2.12


* [removed] `crop_resized` and `resize` aliases in RMagick, use `resize_to_fill` and `resize_to_fit` respectively

=== Version 0.4.0 2009-10-12

Expand Down
12 changes: 6 additions & 6 deletions README.rdoc
Expand Up @@ -128,7 +128,7 @@ example is image thumbnails. There is built in support for this:
process :resize => [800, 800]

version :thumb do
process :crop_resized => [200,200]
process :resize_to_fill => [200,200]
end

end
Expand Down Expand Up @@ -271,14 +271,14 @@ include it in your Uploader:
end

The RMagick module gives you a few methods, like
+CarrierWave::RMagick#crop_resized+ which manipulate the image file in some way.
You can set a +process+ callback, which will call that method any time a file is
uploaded.
+CarrierWave::RMagick#resize_to_fill+ which manipulate the image file in some
way. You can set a +process+ callback, which will call that method any time a
file is uploaded.

class AvatarUploader < CarrierWave::Uploader::Base
include CarrierWave::RMagick

process :crop_resized => [200, 200]
process :resize_to_fill => [200, 200]
process :convert => 'png'

def filename
Expand All @@ -296,7 +296,7 @@ ImageScience works the same way as RMagick.
class AvatarUploader < CarrierWave::Uploader::Base
include CarrierWave::ImageScience

process :crop_resized => [200, 200]
process :resize_to_fill => [200, 200]
end

== Migrating
Expand Down
4 changes: 0 additions & 4 deletions lib/carrierwave/processing/rmagick.rb
Expand Up @@ -177,8 +177,6 @@ def resize_to_fit(width, height)
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
Expand All @@ -203,8 +201,6 @@ def resize_to_fill(width, height)
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
Expand Down

0 comments on commit 3e024c0

Please sign in to comment.