Sha256: a09965059ae85965baea58385c53e815322ecfe4817407fa1493851f1d45c2d9
Contents?: true
Size: 588 Bytes
Versions: 6
Compression:
Stored size: 588 Bytes
Contents
# -*- encoding : utf-8 -*- require 'rademade_admin/uploader/photo' module RademadeAdmin module Uploader module CropPhoto include ::RademadeAdmin::Uploader::Photo def crop_image(params, image_path = nil) crop_path = image_path ? full_image_path(image_path) : path crop(crop_path, params[:x], params[:y], params[:w], params[:h]) end def original_dimensions if file && model image = Magick::Image.read(file.file).first [image.columns, image.rows] else [] end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems