Module: RademadeAdmin::Uploader::CropPhoto
Instance Method Summary collapse
Methods included from Photo
#delete_other_images, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RademadeAdmin::Uploader::Photo
Instance Method Details
#crop_image(image_path, params) ⇒ Object
9 10 11 |
# File 'lib/rademade_admin/uploader/crop_photo.rb', line 9 def crop_image(image_path, params) crop( full_image_path(image_path), params[:x], params[:y], params[:w], params[:h] ) end |
#original_dimensions ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/rademade_admin/uploader/crop_photo.rb', line 13 def original_dimensions if file && model image = Magick::Image.read(file.file).first [image.columns, image.rows] else [] end end |